Method: FlexMock#mock_handle

Defined in:
lib/flexmock/deprecated_methods.rb

#mock_handle(sym, expected_count = nil, &block) ⇒ Object

Handle all messages denoted by sym by calling the given block and passing any parameters to the block. If we know exactly how many calls are to be made to a particular method, we may check that by passing in the number of expected calls as a second paramter.



40
41
42
43
44
# File 'lib/flexmock/deprecated_methods.rb', line 40

def mock_handle(sym, expected_count=nil, &block) # :nodoc:
  $stderr.puts "mock_handle is deprecated, " +
    "use the new should_receive interface instead."
  self.should_receive(sym).times(expected_count).returns(&block)
end