class RSpec::Mocks::AnyInstance::StubChain
@private
Public Instance Methods
expectation_fulfilled?()
click to toggle source
@private
# File lib/rspec/mocks/any_instance/stub_chain.rb, line 8 def expectation_fulfilled? true end
Private Instance Methods
create_message_expectation_on(instance)
click to toggle source
# File lib/rspec/mocks/any_instance/stub_chain.rb, line 14 def create_message_expectation_on(instance) proxy = ::RSpec::Mocks.proxy_for(instance) expected_from = IGNORED_BACKTRACE_LINE stub = proxy.add_stub(expected_from, *@expectation_args, &@expectation_block) @recorder.stubs[stub.message] << stub stub end
invocation_order()
click to toggle source
# File lib/rspec/mocks/any_instance/stub_chain.rb, line 22 def invocation_order @invocation_order ||= { :with => [nil], :and_return => [:with, nil], :and_raise => [:with, nil], :and_yield => [:with, nil], :and_call_original => [:with, nil] } end
verify_invocation_order(rspec_method_name, *args, &block)
click to toggle source
# File lib/rspec/mocks/any_instance/stub_chain.rb, line 32 def verify_invocation_order(rspec_method_name, *args, &block) unless invocation_order[rspec_method_name].include?(last_message) raise(NoMethodError, "Undefined method #{rspec_method_name}") end end