[rspec-users] do I use mocking (vs fixtures) for methods that produce results based on non-trivial SQL queries

Pat Maddox pergesu at gmail.com
Fri Sep 5 23:19:06 EDT 2008

> In fact, fixtures can get in the way, which is why you'll see
> Video.delete_all in a lot of our before(:each)'s (often accompanied by
> acerbic comments about "fixture bullshit.")

Someone on your team has quite the potty mouth! :O


But seriously.  Rails-style fixtures suck.  You should be creating as
much of the test data inline as possible (IMO), using helpers to build
it for you.


More information about the rspec-users mailing list