"Greg Hauptmann" <[EMAIL PROTECTED]> writes: > hi, > > I have an issue in that I have some reference data my migrations run > in. However when running "rake spec" it seems to remove the data in > the test database up front. > > What do you recommend to workaround this issue? > > Thanks > Greg > _______________________________________________ > rspec-users mailing list > [email protected] > http://rubyforge.org/mailman/listinfo/rspec-users
You should probably create it in a before block, or if the reference data is always going to be the same, you'll want to insert it into the db BEFORE the test transactions start. That will require a bit of work...clear out all the tables and insert the data, that way when transactions get rolled back you're back at the db with reference data. I'm not quite sure how to do that though. Is there a before(:suite) that might work? Pat _______________________________________________ rspec-users mailing list [email protected] http://rubyforge.org/mailman/listinfo/rspec-users
