Clear connection cache after rolling back transaction.

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3221 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
This commit is contained in:
Jeremy Kemper 2005-12-05 19:58:11 +00:00
parent 0632f5a93e
commit b13573ed37

@ -503,13 +503,12 @@ def setup_with_fixtures
alias_method :setup, :setup_with_fixtures
def teardown_with_fixtures
ActiveRecord::Base.clear_connection_cache!
ensure
# Rollback changes.
if use_transactional_fixtures?
ActiveRecord::Base.connection.rollback_db_transaction
ActiveRecord::Base.unlock_mutex
end
ActiveRecord::Base.clear_connection_cache!
end
alias_method :teardown, :teardown_with_fixtures