redding/assert — pull request #194 by kellyredding (2014-06-16 17:24:43+00:00)
Title: stubbing class and api

This adds a stub class that can be used to stub method calls. It
takes an object and method name and sets itself up on the object.
If given a block when created, that block will now be called in
place of _any_ method calls. Calling `.with` on the stub adds
args-specific call stubbing. Call `.teardown` to remove the stub
from the object.

Stubbing is noisy - it will complain anytime something seems off
(ie you stub a method the object doesn't respond to or add a with
stub with mismatched arity).

Stubs are safe to create on the same object/method repeatedly. Stubs
are not overly smart - you define with a block and it replaces the
call - that's it.

You can create/access/teardown theses stubs using the `Assert.stub`
and `Assert.unstub` helper methods. These methods track created
stubs and allow easy access to them and to tearing them down.

Closes #150.