Browse files

Fix transaction exception test

  • Loading branch information...
1 parent 039d78a commit f54be2cb3105856dc1fb31afc6c9012a91e53823 @jeremy jeremy committed Sep 4, 2008
Showing with 1 addition and 0 deletions.
  1. +1 −0 activerecord/test/cases/transactions_test.rb
View
1 activerecord/test/cases/transactions_test.rb
@@ -216,6 +216,7 @@ def test_manually_rolling_back_a_transaction
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)

0 comments on commit f54be2c

Please sign in to comment.