David Chelimsky wrote: > On Sun, Mar 7, 2010 at 9:45 AM, Russell Fine <li...@ruby-forum.com> > wrote: >> Our app connects to two databases. �The main database (through >> ActiveRecord::Base) is automatically cleared before each test. �How do I >> force the clear of the secondary database as well ? > > There's no implicit support for this, so you'd have to do something > manually in a before(:each) block. You can do that in the > configuration (usually in spec_helper): > > Spec::Runner.configure do |c| > c.before(:each) do > # clear out 2ndary db > end > end > > HTH, > David
Thanks for the quick reply. Do you happen to know where in the framework I would call to clear out the db? I can obviously do it myself by hand by just deleting all elements, but I'm worried that the testing framework may perform some unique actions that differ from what I would do. Russell -- Posted via http://www.ruby-forum.com/. _______________________________________________ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users