diff --git a/activerecord/test/cases/tasks/database_tasks_test.rb b/activerecord/test/cases/tasks/database_tasks_test.rb index 696003fcb8..06f11108f9 100644 --- a/activerecord/test/cases/tasks/database_tasks_test.rb +++ b/activerecord/test/cases/tasks/database_tasks_test.rb @@ -951,6 +951,10 @@ module ActiveRecord fixtures :authors, :author_addresses + def teardown + ActiveRecord::Base.connection_handlers = { writing: ActiveRecord::Base.default_connection_handler } + end + def test_truncate_tables assert_operator Author.count, :>, 0 assert_operator AuthorAddress.count, :>, 0