lib/rspec/mocks/methods.rb in rspec-mocks-2.12.2 vs lib/rspec/mocks/methods.rb in rspec-mocks-2.13.0

- old
+ new

@@ -80,10 +80,10 @@ def stub_chain(*chain, &blk) chain, blk = format_chain(*chain, &blk) if chain.length > 1 if matching_stub = __mock_proxy.__send__(:find_matching_method_stub, chain[0].to_sym) chain.shift - matching_stub.invoke.stub_chain(*chain, &blk) + matching_stub.invoke(nil).stub_chain(*chain, &blk) else next_in_chain = Mock.new stub(chain.shift) { next_in_chain } next_in_chain.stub_chain(*chain, &blk) end