Hi list, I''m having a little problem with fixtures and functional tests. It seems that the fixtures that get''s loaded by the unit tests aren''t deleted when the functional tests starts running. Now IMHO this is not good as it means I can get different test results from running all tests and only functional tests. Am I missing something or should I report this bug to the dev''s? I can''t seem to find anything about it in the issue tracker. -- Cheers, - Jacob Atzen
Francois Beausoleil
2005-Dec-05 20:20 UTC
Re: Fixtures surviving from unit tests to functional tests
Hi ! 2005/12/5, Jacob Atzen <jacob@aub.dk>:> I'm having a little problem with fixtures and functional tests. It seems > that the fixtures that get's loaded by the unit tests aren't deleted > when the functional tests starts running. Now IMHO this is not good as > it means I can get different test results from running all tests and > only functional tests. Am I missing something or should I report this > bug to the dev's? I can't seem to find anything about it in the issue > tracker.This is normal and expected. When a test executes #teardown, it does not delete the DB content. If you use transactional fixtures, #teardown will ROLLBACK the transaction, but beyond that, nothing will be done with the DB. If you need empty fixtures in your functional tests, you'll need to ensure that yourself - #setup should be changed to do it, or do it in test/test_helper.rb Hope that helps ! -- François Beausoleil http://blog.teksol.info/ _______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails