Bourne

Bourne extends mocha to allow detailed tracking and querying of stub and mock
invocations. It allows test spies using the have_received rspec matcher and
assert_received for Test::Unit. Bourne was extracted from jferris-mocha, a fork
of mocha that adds test spies.

Test Spies

Test spies are a form of test double that preserves the normal four-phase unit
test order and allows separation of stubbing and verification.

Using a test spy is like using a mocked expectation except that there are two steps:

Stub out a method for which you want to verify invocations

Use an assertion or matcher to verify that the stub was invoked correctly