An expectation recorder records any expectations received and plays them back on demand. This is used to collect the expectations in the blockless version of the new_instances call.
Initialize the recorder.
# File lib/flexmock/expectation.rb, line 483 def initialize @expectations =  end
Apply the recorded messages to the given object in a chaining fashion (i.e. the result of the previous call is used as the target of the next call).
# File lib/flexmock/expectation.rb, line 496 def apply(mock) obj = mock @expectations.each do |sym, args, block| obj = obj.send(sym, *args, &block) end end
Save any incoming messages to be played back later.
# File lib/flexmock/expectation.rb, line 488 def method_missing(sym, *args, &block) @expectations << [sym, args, block] self end