Thank you for building and maintaining rubocop-rspec. My team uses this and a lot of the defaults are pretty sensible, and help us to write cleaner tests!
FactoryBot recently released version 6.0.0, which introduces a new method to use within a factory definition, #traits_for_enum. Using this causes Rubocop to flag it with FactoryBot/AttributeDefinedStatically. This issue stems from the fact that this new method is not included in Rubocop::RSpec::FactoryBot.reserved_methods.
Thank you for building and maintaining
rubocop-rspec
. My team uses this and a lot of the defaults are pretty sensible, and help us to write cleaner tests!FactoryBot
recently released version6.0.0
, which introduces a new method to use within a factory definition,#traits_for_enum
. Using this causes Rubocop to flag it withFactoryBot/AttributeDefinedStatically
. This issue stems from the fact that this new method is not included inRubocop::RSpec::FactoryBot.reserved_methods
.https://github.com/rubocop-hq/rubocop-rspec/blob/fad338729759334cb7411802e54cdf84f0e685c4/lib/rubocop/rspec/factory_bot.rb#L37-L40
A simple fix would be to include this reserved method in the list. I don't mind creating a PR for this.
Curious to hear your thoughts!