I have to persist some data in the database to test the interactions
between two of my models. One model has a serial number attribute that
is unique, so it must be entered once and only once.
rake spec deletes all the data, allowing my tests to pass. . Running
rspec under TextMate produces a fail, however, because the data in
tables remain. This is somewhat inconsistent, too. Running it twice
produces a pass.
Any ideas? How can I ensure that the database – or at least the
tables for the two models – is empty?
Fresh Pixels and Bytes (and now Commas!), Baked Daily