Module Mocha::API
In: lib/bourne/api.rb

Methods

Classes and Modules

Class Mocha::API::InvalidHaveReceived

Public Instance methods

Asserts that the given mock received the given method.

Examples:

  assert_received(mock, :to_s)
  assert_received(Radio, :new) {|expect| expect.with(1041) }
  assert_received(radio, :volume) {|expect| expect.with(11).twice }

Ensures that the given mock received the given method.

Examples:

  mock.should have_received(:to_s)
  Radio.should have_received(:new).with(1041)
  radio.should have_received(:volume).with(11).twice

[Validate]