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

Inherits:
Chain
  • Object
show all
Defined in:
lib/rspec/mocks/any_instance/expectation_chain.rb

Direct Known Subclasses

PositiveExpectationChain

Instance Method Summary (collapse)

Methods inherited from Chain

#constrained_to_any_of?, #expectation_fulfilled!, #never, #playback!

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, &block)



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?



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