#96: rails tests not getting rolled back

There are a number of reasons this might happen: you have a test, it runs fine individually, but when you run rake test or rake test:units, it fails. This might be because one test is writing to the db and those changes aren't getting rolled back.


If you're testing code that switches db connections, this will break the transaction that wraps your test. That test might pass, but it will leave data in the db that might break subsequent tests.

Think you've got a better solution? Help 148c663fd665c53518538e093ce3c2ab_small kueda out by posting your solution