Handoff provides a fluent interface for testing simple delegation. The Ruby stdlib module Forwardable makes implementing delegation simple and readable. Handoff is intended to make the code to test it just as simple and readable.

You can install the latest gem using gem install handoff or download the .gem file from rubyforge.org/projects/handoff.

As of 0.2.0, Handoff no longer depends on Mocha and Stubba.

Here’s example_test.rb to give you an idea of what you can do:

:include: examples/example_test.rb