diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2008-09-04 13:24:55 +0200 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2008-09-04 13:24:55 +0200 |
commit | f54be2cb3105856dc1fb31afc6c9012a91e53823 (patch) | |
tree | 4c5835aed765220ce83a9d167ced57e564670781 /activerecord | |
parent | 039d78a7d81c8ac49dcb6ba0304d32af671d56c9 (diff) | |
download | rails-f54be2cb3105856dc1fb31afc6c9012a91e53823.tar.gz rails-f54be2cb3105856dc1fb31afc6c9012a91e53823.tar.bz2 rails-f54be2cb3105856dc1fb31afc6c9012a91e53823.zip |
Fix transaction exception test
Diffstat (limited to 'activerecord')
-rw-r--r-- | activerecord/test/cases/transactions_test.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/activerecord/test/cases/transactions_test.rb b/activerecord/test/cases/transactions_test.rb index 8383ba58e9..a8016cd984 100644 --- a/activerecord/test/cases/transactions_test.rb +++ b/activerecord/test/cases/transactions_test.rb @@ -216,6 +216,7 @@ class TransactionTest < ActiveRecord::TestCase uses_mocha 'mocking connection.commit_db_transaction' do def test_rollback_when_commit_raises Topic.connection.expects(:begin_db_transaction) + Topic.connection.expects(:transaction_active?).returns(true) if current_adapter?(:PostgreSQLAdapter) Topic.connection.expects(:commit_db_transaction).raises('OH NOES') Topic.connection.expects(:rollback_db_transaction) |