lib/rubocop/cop/rspec/multiple_expectations.rb in rubocop-rspec-1.8.0 vs lib/rubocop/cop/rspec/multiple_expectations.rb in rubocop-rspec-1.9.0

- old
+ new

@@ -44,18 +44,14 @@ # expect(user.age).to eq(22) # end # end # class MultipleExpectations < Cop - include RuboCop::RSpec::SpecOnly, - RuboCop::RSpec::Language, - ConfigurableMax + include ConfigurableMax MSG = 'Too many expectations.'.freeze - def_node_matcher :example?, <<-PATTERN - (block (send _ {#{Examples::ALL.to_node_pattern}} ...) ...) - PATTERN + def_node_matcher :example?, Examples::ALL.block_pattern def_node_search :expect, '(send _ :expect ...)' def on_block(node) return unless example?(node) && (expectations = expect(node))