diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index ac4250e4..f927dff2 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -48,7 +48,10 @@ # Cleans up the database before each example, so the current example doesn't # see the state of the previous one config.before(:each) do |example| - test_database.setup if example.metadata[:integration] + if example.metadata[:integration] + test_database.setup + ActiveRecord::Base.connection_pool.disconnect! + end end config.order = :random