Class: RSpec::Mocks::AnyInstance::ExpectChainChain

Inherits:
StubChain show all
Defined in:
lib/rspec/mocks/any_instance/expect_chain_chain.rb

Instance Method Summary (collapse)

Methods inherited from Chain

#constrained_to_any_of?, #expectation_fulfilled!, #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

- (ExpectChainChain) initialize(*args)



6
7
8
9
# File 'lib/rspec/mocks/any_instance/expect_chain_chain.rb', line 6

def initialize(*args)
  super
  @expectation_fulfilled = false
end

Instance Method Details

- (Boolean) expectation_fulfilled?



11
12
13
# File 'lib/rspec/mocks/any_instance/expect_chain_chain.rb', line 11

def expectation_fulfilled?
  @expectation_fulfilled
end

- (Object) playback!(instance)



15
16
17
# File 'lib/rspec/mocks/any_instance/expect_chain_chain.rb', line 15

def playback!(instance)
  super.tap { @expectation_fulfilled = true }
end