[rspec-users] Advice with Model tests

jshen jaydonnell at yahoo.com
Thu Dec 21 13:43:42 EST 2006

"Since I've seen many examples here and
there, I don't know if the right way is to use fixtures or not at all
(in model specs)."

I've personally had a lot of problems with fixtures. One of my current rails
apps uses test::unit and fixtures and the fixtures become like spaghetti
code very fast. As your tests evolve over time it becomes very hard to
manage your fixtures if they aren't super simple. When your writing a new
test you don't know if you can add to a certain fixture association or not
because it may break some other test in your app. If you delete a test that
is no longer necessary you are unsure if you can delete the associated
fixture data because some other test may depend on it. 

I also agree with david in that it's nice to see everything in the context
of the test.
View this message in context: http://www.nabble.com/Advice-with-Model-tests-tf2865964.html#a8012839
Sent from the rspec-users mailing list archive at Nabble.com.

More information about the rspec-users mailing list