lib/rubocop/cop/rspec/factory_bot/syntax_methods.rb in rubocop-rspec-2.13.2 vs lib/rubocop/cop/rspec/factory_bot/syntax_methods.rb in rubocop-rspec-2.14.0
- old
+ new
@@ -52,28 +52,10 @@
include RangeHelp
include RuboCop::RSpec::FactoryBot::Language
MSG = 'Use `%<method>s` from `FactoryBot::Syntax::Methods`.'
- RESTRICT_ON_SEND = %i[
- attributes_for
- attributes_for_list
- attributes_for_pair
- build
- build_list
- build_pair
- build_stubbed
- build_stubbed_list
- build_stubbed_pair
- create
- create_list
- create_pair
- generate
- generate_list
- null
- null_list
- null_pair
- ].to_set.freeze
+ RESTRICT_ON_SEND = RuboCop::RSpec::FactoryBot::Language::METHODS
def on_send(node)
return unless factory_bot?(node.receiver)
return unless inside_example_group?(node)