@api private
# File lib/rspec/mocks/any_instance/expectation_chain.rb, line 40 def initialize(*args, &block) super(:should_not_receive, *args, &block) end
`should_not_receive` causes a failure at the point in time the message is wrongly received, rather than during `rspec_verify` at the end of an example. Thus, we should always consider a negative expectation fulfilled for the purposes of end-of-example verification (which is where this is used).
# File lib/rspec/mocks/any_instance/expectation_chain.rb, line 49 def expectation_fulfilled? true end
# File lib/rspec/mocks/any_instance/expectation_chain.rb, line 55 def invocation_order @invocation_order ||= { :should_not_receive => [nil], :with => [:should_receive], :and_return => [:with, :should_receive], :and_raise => [:with, :should_receive] } end