FactoryBot
FactoryBot/AttributeDefinedStatically
Enabled by default | Safe | Supports autocorrection | VersionAdded | VersionChanged |
---|---|---|---|---|
Enabled |
Yes |
Yes |
1.28 |
- |
Always declare attribute values as blocks.
FactoryBot/CreateList
Enabled by default | Safe | Supports autocorrection | VersionAdded | VersionChanged |
---|---|---|---|---|
Enabled |
Yes |
Yes |
1.25 |
- |
Checks for create_list usage.
This cop can be configured using the EnforcedStyle
option
Examples
FactoryBot/FactoryClassName
Enabled by default | Safe | Supports autocorrection | VersionAdded | VersionChanged |
---|---|---|---|---|
Enabled |
Yes |
Yes |
1.37 |
- |
Use string value when setting the class attribute explicitly.
This cop would promote faster tests by lazy-loading of application files. Also, this could help you suppress potential bugs in combination with external libraries by avoiding a preload of application files from the factory files.