lib/rubocop/cop/rspec/multiple_expectations.rb in rubocop-rspec-1.18.0 vs lib/rubocop/cop/rspec/multiple_expectations.rb in rubocop-rspec-1.19.0
- old
+ new
@@ -97,11 +97,15 @@
def flag_example(node, expectation_count:)
method, = *node
add_offense(
method,
- :expression,
- format(MSG, total: expectation_count, max: max_expectations)
+ location: :expression,
+ message: format(
+ MSG,
+ total: expectation_count,
+ max: max_expectations
+ )
)
end
def max_expectations
Integer(cop_config.fetch('Max', 1))