Fix a stale typo in the PostgreSQL adapter. Fix a stale mock expection in transaction_test.

This commit is contained in:
Hongli Lai (Phusion)
2008-10-09 14:52:02 +02:00
parent e383835e73
commit e981eaaf34
2 changed files with 1 additions and 2 deletions

View File

@@ -537,7 +537,7 @@ module ActiveRecord
execute("ROLLBACK TO SAVEPOINT #{current_savepoint_name}")
end
def release_savepoint(savepoint_number)
def release_savepoint
execute("RELEASE SAVEPOINT #{current_savepoint_name}")
end

View File

@@ -309,7 +309,6 @@ 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)