Class: RSpec::Mocks::AnyInstance::NegativeExpectationChain Private

Inherits:
ExpectationChain show all
Defined in:
lib/rspec/mocks/any_instance/expectation_chain.rb

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Instance Method Summary (collapse)

Methods inherited from ExpectationChain

#initialize

Methods inherited from Chain

#and_call_original, #and_raise, #and_return, #and_throw, #and_yield, #any_number_of_times, #at_least, #at_most, #exactly, #initialize, #never, #once, #times, #twice, #with

Constructor Details

This class inherits a constructor from RSpec::Mocks::AnyInstance::ExpectationChain

Instance Method Details

- (Boolean) expectation_fulfilled?

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

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).

Returns:

  • (Boolean)


47
48
49
# File 'lib/rspec/mocks/any_instance/expectation_chain.rb', line 47

def expectation_fulfilled?
  true
end