I have a fixture for one of my tables that i use in some model tests.
The
data in it is messing up some other tests for a different model, that
doesn’t ask for the fixture - isn’t the fixture data supposed to be
cleared
out of the test db in between tests, and only be present if specifically
asked for? or am i using them wrong?
I have a fixture for one of my tables that i use in some model tests. The
data in it is messing up some other tests for a different model, that
doesn’t ask for the fixture - isn’t the fixture data supposed to be cleared
out of the test db in between tests, and only be present if specifically
asked for? or am i using them wrong?
It depends on settings you have in spec_helper.rb. You should have this:
config.use_transactional_fixtures = true
You should also not be declaring any fixtures in spec_helper.rb, given
your situation.
I have that option set already, and i’m not using any fixtures in
spec_helper. My spec helper looks like this: is it the
use_instantiated_fixtures option perhaps? (i don’t know what that
does).