Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

create the rubocop that will check name of factory bot #57

Open
Ivanov-Anton opened this issue Jun 27, 2023 · 1 comment
Open

create the rubocop that will check name of factory bot #57

Ivanov-Anton opened this issue Jun 27, 2023 · 1 comment
Labels
cop good first issue Good for newcomers

Comments

@Ivanov-Anton
Copy link

Description:

In case when developer defines a factory in a separate file (one file equal to one factory)
the file name of such a factory should be one of these:

  1. Pluralize the model name (example: country model => countries.rb)
  2. model name and plus "_factory" (example: country model => country_factory.rb)

Additionally, the new robocop can be implemented with configuration options to decide what style from these two is chosen.

@Ivanov-Anton
Copy link
Author

see how the annotate_models gem is detect factories

(spec|test)/factories/<model>_factory.rb

@ydah ydah added cop good first issue Good for newcomers labels Jul 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cop good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants