lib/rubocop/cop/rspec/message_chain.rb in rubocop-rspec-1.37.0 vs lib/rubocop/cop/rspec/message_chain.rb in rubocop-rspec-1.37.1
- old
+ new
@@ -9,10 +9,10 @@
# # bad
# allow(foo).to receive_message_chain(:bar, :baz).and_return(42)
#
# # better
# thing = Thing.new(baz: 42)
- # allow(foo).to receive(bar: thing)
+ # allow(foo).to receive(:bar).and_return(thing)
#
class MessageChain < Cop
MSG = 'Avoid stubbing using `%<method>s`.'
def_node_matcher :message_chain, <<-PATTERN