Class: RSpec::Mocks::AnyInstance::StubChain

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

Instance Method Summary collapse

Methods inherited from Chain

#constrained_to_any_of?, #playback!

Constructor Details

#initialize(*args, &block) ⇒ StubChain

Returns a new instance of StubChain.



49
50
51
# File 'lib/rspec/mocks/any_instance.rb', line 49

def initialize(*args, &block)
  record(:stub, *args, &block)
end

Instance Method Details

#expectation_filfilled?Boolean

Returns:

  • (Boolean)


63
64
65
# File 'lib/rspec/mocks/any_instance.rb', line 63

def expectation_filfilled?
  true
end

#invocation_orderObject



53
54
55
56
57
58
59
60
61
# File 'lib/rspec/mocks/any_instance.rb', line 53

def invocation_order
  @invocation_order ||= {
    :stub => [nil],
    :with => [:stub],
    :and_return => [:with, :stub],
    :and_raise => [:with, :stub],
    :and_yield => [:with, :stub]
  }
end