I’ve got a very peculiar problem with unit tests. First, I clone my
development database with “rake clone_structure_to_test”, then I run my
test with “ruby investment_product_score_override_test.rb”. It fails on
line 68. Then, every test run after this, fails consistently on line 34.
How is this possible? I don’t use fixtures and I don’t use hardcoded
id’s or whatever. Unit tests are performed in a transaction, which is
rolled back when the test is done. So, how can the data of the first run
influence the second run? As far as I can see, the only thing that
changes, are the sequences, which shouldn’t be a problem, since I don’t
use hardcoded id’s.
Is there something else that lingers in the DB after a test is run?