-
-
Save daveltr/ab99738d30833708652f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
RSpec.configure do |config| | |
config.before(:suite) do | |
ActiveRecord::Base.establish_connection database['one'] | |
DatabaseCleaner.strategy = :deletion | |
ActiveRecord::Base.establish_connection config.database['two'] | |
DatabaseCleaner.strategy = :deletion | |
end | |
config.before(:each) do | |
ActiveRecord::Base.establish_connection database['one'] | |
DatabaseCleaner.start | |
ActiveRecord::Base.establish_connection database['two'] | |
DatabaseCleaner.start | |
end | |
config.after(:each) do | |
ActiveRecord::Base.establish_connection database['one'] | |
DatabaseCleaner.clean | |
ActiveRecord::Base.establish_connection database['two'] | |
DatabaseCleaner.clean | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment