Sprinkle Some Integration Tests into a Mock Heavy Test Suite
I like mocks and stubs and I use them liberally in my tests. This practice, however, is not without danger: If my models, views, and controllers are all tested in isolation then how will I know if a model change busts a controller or a view? Here's something I like to drop in at the end of every controller spec:
Not a mock or a stub as far as the eye can see and I'm even integrating views. Normally RSpec doesn't render the view in a controller spec, but if you include "integrate_views" it will. So now if I make some changes that bust MVC integration my spec will let me know. I don't try to exercise all the possible paths with these tests -- rather they are a safety net for problems isolated specs won't detect.
describe JerkStoreController, "with views integrated and real objects" do