DEV: Clean up state for another test.

DEV: Clean up state for another test.

diff --git a/spec/connection_management_spec.rb b/spec/connection_management_spec.rb
index fba9a6b..60e0249 100644
--- a/spec/connection_management_spec.rb
+++ b/spec/connection_management_spec.rb
@@ -65,6 +65,8 @@ describe RailsMultisite::ConnectionManagement do
     conn.config_filename = fixture_path("two_dbs.yml")
     expect(conn.connection_spec(db: "second").config[:prepared_statements]).to be(false)
     ActiveRecord::Base.configurations[Rails.env]["prepared_statements"] = nil
+  ensure
+    ActiveRecord::Base.remove_connection
   end
 
   context 'two dbs' do

GitHub sha: ea61b434

1 Like