1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Fix transaction exception test

This commit is contained in:
Jeremy Kemper 2008-09-04 13:24:55 +02:00
parent 039d78a7d8
commit f54be2cb31

View file

@ -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)