Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 6d93edd2c6
Fetching contributors…

Cannot retrieve contributors at this time

34 lines (30 sloc) 0.835 kb
module RSpec
module Mocks
module AnyInstance
class StubChainChain < Chain
def initialize(*args, &block)
record(:stub_chain, *args, &block)
end
def invocation_order
@invocation_order ||= {
:stub_chain => [nil],
:and_return => [:stub_chain],
:and_raise => [:stub_chain],
:and_yield => [:stub_chain]
}
end
def expectation_fulfilled?
true
end
def expectation_fulfilled!
end
private
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
end
end
end
end
Jump to Line
Something went wrong with that request. Please try again.