lib/rubocop/cop/rspec/overwriting_setup.rb in rubocop-rspec-1.18.0 vs lib/rubocop/cop/rspec/overwriting_setup.rb in rubocop-rspec-1.19.0

- old
+ new

@@ -23,19 +23,23 @@ # let!(:other) { other } class OverwritingSetup < Cop MSG = '`%<name>s` is already defined.'.freeze def_node_matcher :setup?, <<-PATTERN - (block (send nil {:let :let! :subject} (sym $_)) ...) + (block (send nil? {:let :let! :subject} (sym $_)) ...) PATTERN def on_block(node) return unless example_group_with_body?(node) _describe, _args, body = *node find_duplicates(body) do |duplicate, name| - add_offense(duplicate, :expression, format(MSG, name: name)) + add_offense( + duplicate, + location: :expression, + message: format(MSG, name: name) + ) end end private