From 885c11b8f9e18f34b12076023455e72166365f00 Mon Sep 17 00:00:00 2001 From: "Hongli Lai (Phusion)" Date: Thu, 9 Oct 2008 15:41:56 +0200 Subject: Make SQLite3 pass the unit tests for savepoints. --- activerecord/test/cases/transactions_test.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'activerecord/test/cases') diff --git a/activerecord/test/cases/transactions_test.rb b/activerecord/test/cases/transactions_test.rb index 4bbcd272b7..3c6bfd7e22 100644 --- a/activerecord/test/cases/transactions_test.rb +++ b/activerecord/test/cases/transactions_test.rb @@ -239,7 +239,7 @@ class TransactionTest < ActiveRecord::TestCase assert @first.reload.approved? assert !@second.reload.approved? - end + end if Topic.connection.supports_savepoints? def test_no_savepoint_in_nested_transaction_without_force Topic.transaction do @@ -260,7 +260,7 @@ class TransactionTest < ActiveRecord::TestCase assert !@first.reload.approved? assert !@second.reload.approved? - end + end if Topic.connection.supports_savepoints? def test_many_savepoints Topic.transaction do @@ -304,7 +304,7 @@ class TransactionTest < ActiveRecord::TestCase assert_equal "One", @one assert_equal "Two", @two assert_equal "Three", @three - end + end if Topic.connection.supports_savepoints? uses_mocha 'mocking connection.commit_db_transaction' do def test_rollback_when_commit_raises @@ -411,7 +411,7 @@ class TransactionsWithTransactionalFixturesTest < ActiveRecord::TestCase assert !@first.reload.approved? end -end +end if Topic.connection.supports_savepoints? if current_adapter?(:PostgreSQLAdapter) class ConcurrentTransactionTest < TransactionTest -- cgit v1.2.3