Re: [rspec-users] How to test an app with multiple databases?

2010-07-08 Thread David Chelimsky
On Jul 8, 2010, at 2:27 AM, Juanma Cervera wrote: > Ben Mabey wrote: >> Spec::Runner.configure do |c| >> c.before(:each) do >>ActiveRecord::Base::establish_connection :secondary_db >>DatabaseCleaner.start >>ActiveRecord::Base::establish_connection :primary_db >> end >> >> c.after(

Re: [rspec-users] How to test an app with multiple databases?

2010-07-08 Thread Juanma Cervera
Ben Mabey wrote: > Spec::Runner.configure do |c| > c.before(:each) do > ActiveRecord::Base::establish_connection :secondary_db > DatabaseCleaner.start > ActiveRecord::Base::establish_connection :primary_db > end > > c.after(:each) do > ActiveRecord::Base::establish_connection

Re: [rspec-users] How to test an app with multiple databases?

2010-03-08 Thread Ben Mabey
David Chelimsky wrote: On Sun, Mar 7, 2010 at 10:11 AM, Russell Fine wrote: David Chelimsky wrote: On Sun, Mar 7, 2010 at 9:45 AM, Russell Fine wrote: Our app connects to two databases. �The main database (through ActiveRecord::Base) is automatically cleared before each test.

Re: [rspec-users] How to test an app with multiple databases?

2010-03-07 Thread David Chelimsky
On Sun, Mar 7, 2010 at 10:11 AM, Russell Fine wrote: > David Chelimsky wrote: >> On Sun, Mar 7, 2010 at 9:45 AM, Russell Fine >> wrote: >>> Our app connects to two databases. �The main database (through >>> ActiveRecord::Base) is automatically cleared before each test. �How do I >>> force the cle

Re: [rspec-users] How to test an app with multiple databases?

2010-03-07 Thread Russell Fine
David Chelimsky wrote: > On Sun, Mar 7, 2010 at 9:45 AM, Russell Fine > 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 impli

Re: [rspec-users] How to test an app with multiple databases?

2010-03-07 Thread David Chelimsky
On Sun, Mar 7, 2010 at 9:45 AM, Russell Fine 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

[rspec-users] How to test an app with multiple databases?

2010-03-07 Thread Russell Fine
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 ? Thanks in advance... Russell -- Posted via http://www.ruby-forum.com/. _