lib/rubocop/cop/rspec/message_chain.rb in rubocop-rspec-1.25.1 vs lib/rubocop/cop/rspec/message_chain.rb in rubocop-rspec-1.26.0
- old
+ new
@@ -12,10 +12,12 @@
# allow(foo).to receive(bar: thing)
#
class MessageChain < Cop
MSG = 'Avoid stubbing using `%<method>s`.'.freeze
- def_node_matcher :message_chain, Matchers::MESSAGE_CHAIN.send_pattern
+ 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