Method: FlexMock#should_expect

Defined in:
lib/gems/flexmock-0.8.3/lib/flexmock/core.rb

#should_expect {|Recorder.new(self)| ... } ⇒ Object

Declare that the mock object should expect methods by providing a recorder for the methods and having the user invoke the expected methods in a block. Further expectations may be applied the result of the recording call.

Example Usage:

mock.should_expect do |record|
  record.add(Integer, 4) { |a, b|
    a + b
  }.at_least.once

Yields:



182
183
184
# File 'lib/gems/flexmock-0.8.3/lib/flexmock/core.rb', line 182

def should_expect
  yield Recorder.new(self)
end