RubyEast ~ Mike Mangino
Mocks and Stubs with:
Method call expectation
Argument checking
Multiple calls
Raising exceptions
Yielding to a block
Test hard to hit conditions
Test Network Errors (such as Facebook development)
Test difficult to achieve application state (User in ___ state, Car in ____ state)
Use to get 100% test coverage
Use it to do view-first development
Test an API before you build it
@job.expects(:purchase).raise(InvalidCoupon.new)
Hard to test when you have a lot of partials. Depend less on them and more on helpers.