There are several documents that mention definition file paths, but none of them are consistent with the current implementation. So I propose to first eliminate the gap between the documentation and the implementation in this pull request.
I would also be interested to know if this implementation is intentional or not, as it is important to know which files should be ideally scanned by rubocop-factory_bot.
The current implementation seems to load all definition files that match the following pattern in this order:
factories.rb
factories/**/*.rb
test/factories.rb
test/factories/**/*.rb
spec/factories.rb
spec/factories/**/*.rb
https://github.com/thoughtbot/factory_bot/blob/053ef4af1a7fd845bb8f5f9ae65967249c247617/lib/factory_bot/find_definitions.rb#L10-L24
There are several documents that mention definition file paths, but none of them are consistent with the current implementation. So I propose to first eliminate the gap between the documentation and the implementation in this pull request.
I would also be interested to know if this implementation is intentional or not, as it is important to know which files should be ideally scanned by rubocop-factory_bot.