lib/rubocop/cop/rspec/message_chain.rb in rubocop-rspec-1.41.0 vs lib/rubocop/cop/rspec/message_chain.rb in rubocop-rspec-1.42.0

- old
+ new

@@ -19,14 +19,15 @@ def_node_matcher :message_chain, <<-PATTERN (send _ {:receive_message_chain :stub_chain} ...) PATTERN def on_send(node) - message_chain(node) { add_offense(node, location: :selector) } - end - - def message(node) - format(MSG, method: node.method_name) + message_chain(node) do + add_offense( + node.loc.selector, + message: format(MSG, method: node.method_name) + ) + end end end end end end