[rspec-users] rspec-orm and _not_ mocking models
Ashley Moran
ashley.moran at patchspace.co.uk
Sun Jul 25 04:40:38 EDT 2010
On 21 Jul 2010, at 10:28 PM, Costa Shapiro wrote:
> (Surprisingly?) I find mocking AR (DM less so) in specs extremely tedious _and_ intrusive.
Yeah, I know what you mean, I just don't do it any more. I find the pain isn't worth it on the stuff I do.
> I think the README there pretty much cuts it, so I'd just welcome the comments here.
One very minor point, you're got a comment to maybe empty the database afterwards. It's more useful to empty it before, as then you've still got the data in the database after a failing example.
Also, if you haven't seen it, Ben Mabey wrote a tool for this[1]. Oh and I wrote one for rebuilding your database if migrations change[2], plug plug :D
Ash
[1] http://github.com/bmabey/database_cleaner
[2] http://rubygems.org/gems/database_resetter
--
http://www.patchspace.co.uk/
http://www.linkedin.com/in/ashleymoran
More information about the rspec-users
mailing list