I have a problem with tests. I always thought that the order of tests
matter because the fixtures are reloaded before every test method.
just discovered that this isn’t true.
This is a quote from the “Guide to testing the rails” howto:
“… if we had another test method, we wouldn?t have 10 users on the 2nd
because they would be wiped out before being created…”
The last part of the quote indicates to me that the fixtures are
each test method.
Scaffold generates same basic tests for you, but these fail for me. My
for the things table has an entry for a thing with id = 1. The destroy
destroys Thing with id = 1 with Thing.destroy(1). The edit test tries to
the same object with Thing.find(1) and fails because the object it’s
has been deleted. But the fixtures should have been reloaded!! I don’t
I’m using Rails 0.14.3 - perhaps this is only an issue here? Does 1.0
this issue? Am I just thinking about fixtures incorrectly, and in fact
never reloaded between test methods? Do I have to do that manually with