Skip to content

create rubocop that will check location of FactoryBot file for specific model #56

@Ivanov-Anton

Description

@Ivanov-Anton

To improve the consistency of factory definitions, we can add a separate Rubocop rule, such as FactoryBot/LocationPath, that enforces creating FactoryBot files in the appropriate folder based on the namespace of the corresponding model.

For instance, if we have a model named "Main::Chat," in the case when the developer defines each factory as a separate file, the FactoryBot file should be located under the "spec/factories/main/" folder.

By implementing this Rubocop rule, we ensure that all factories are consistently organized and adhere to the correct naming conventions and directory structure.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions