[rspec-users] When to use Factories, Mock Models, Mocks & Stubs

Matt Wynne matt at mattwynne.net
Wed Feb 3 09:18:04 EST 2010

On 3 Feb 2010, at 11:35, J. B. Rainsberger wrote:

> I find this rule of thumb helpful: stub unless you're certain to want
> to verify this time that the client invoke the server correctly, and
> never, never mock multiple methods at once.

Right, because the mock (should_receive) is an assertion, and it's  
usually better to have one assertion per example.


+447974 430184

More information about the rspec-users mailing list