Parent

FlexMock::ExpectationRecorder

                                                                        

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.

Public Class Methods

new() click to toggle source

Initialize the recorder.

     # File lib/flexmock/expectation.rb, line 456
456:     def initialize
457:       @expectations = []
458:     end

Public Instance Methods

apply(mock) click to toggle source

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 469
469:     def apply(mock)
470:       obj = mock
471:       @expectations.each do |sym, args, block|
472:         obj = obj.send(sym, *args, &block)
473:       end
474:     end
method_missing(sym, *args, &block) click to toggle source

Save any incoming messages to be played back later.

     # File lib/flexmock/expectation.rb, line 461
461:     def method_missing(sym, *args, &block)
462:       @expectations << [sym, args, block]
463:       self
464:     end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.