[rspec-users] How to test an app with multiple databases?
Juanma Cervera
lists at ruby-forum.com
Thu Jul 8 03:27:49 EDT 2010
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 :secondary_db
> DatabaseCleaner.clean
> ActiveRecord::Base::establish_connection :primary_db
>
> end
> end
How would I translate this code for rspec 2.0.0.beta.15?
I am using Rspec::Core::Runner but it has no configure method.
Thanks
--
Posted via http://www.ruby-forum.com/.
More information about the rspec-users
mailing list