Class: RSpec::Mocks::AnyInstance::ExpectationChain Private

Inherits:
Chain
  • Object
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.

Direct Known Subclasses

PositiveExpectationChain

Instance Method Summary (collapse)

Methods inherited from Chain

#never

Methods included from Chain::Customizations

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

Constructor Details

- (ExpectationChain) initialize(*args)

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.

A new instance of ExpectationChain

10
11
12
13
# File 'lib/rspec/mocks/any_instance/expectation_chain.rb', line 10
def initialize(*args, &block)
  @expectation_fulfilled = false
  super
end

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.

Returns:

  • (Boolean)
6
7
8
# File 'lib/rspec/mocks/any_instance/expectation_chain.rb', line 6
def expectation_fulfilled?
  @expectation_fulfilled || constrained_to_any_of?(:never, :any_number_of_times)
end