Jeremy, Sounds good. Where do you put this? in the spec_helper.rb? I'm using rspec too.
GregD On Jun 4, 11:12 am, Jeremy Evans <[email protected]> wrote: > On Jun 4, 8:02 am, GregD <[email protected]> wrote: > > > Jeremy, > > > This is working out well so far, thanks for the help. Do you or > > anyone else have any suggestions for database clean up from tests? > > I have heard of database cleaner, but it does not list Sequel has > > being supported. Could I surround tests with transactions and do a > > rollback at the appropriate time? > > > Thanks again. > > > GregD > > In my applications that I test with rspec, I use the following: > > class Spec::Example::ExampleGroup > def execute(*args, &block) > DB.transaction{super(*args, &block); raise Sequel::Rollback} > end > end > > This makes each test run in its own transaction. > > Jeremy -- You received this message because you are subscribed to the Google Groups "sequel-talk" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/sequel-talk?hl=en.
