On Wed, May 20, 2009 at 10:27 PM, lawrence.pit <lawrence....@gmail.com> wrote: > Hi All, > > When I execute database actions within a before(:each) they are rolled > back after each example test has run. I expected that if I execute db > actions within a before(:all) they would all be rolled back after all > examples finished running. This appears not to be the case, in my > case. Is there a way to get this behavior?
Nothing built in, and it's probably not something we'd support in rspec-rails, which simply wraps the transaction handling provided by rails, which rolls back after every test method (equivalent of an rspec example). You're not the first to have asked for this, so having a solution for it that would work with rails out of the box and with rspec would be helpful to the community. But I think that would have to be in a separate gem. > Cheers, > Lawrence _______________________________________________ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users