Fix PostgreSQL unit test failures that only occur when using the old 'postgres' driver.

[#1748 state:committed]

Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
This commit is contained in:
Hongli Lai (Phusion)
2009-01-13 16:01:44 +01:00
committed by Jeremy Kemper
parent b281a6a5b2
commit 9bcf01b23c
3 changed files with 13 additions and 12 deletions

View File

@@ -321,9 +321,8 @@ class TransactionTest < ActiveRecord::TestCase
end
end
if current_adapter?(:PostgreSQLAdapter) && PGconn.public_method_defined?(:transaction_status)
if current_adapter?(:PostgreSQLAdapter) && defined?(PGconn::PQTRANS_IDLE)
def test_outside_transaction_works
Topic.logger.info("-------------")
assert Topic.connection.outside_transaction?
Topic.connection.begin_db_transaction
assert !Topic.connection.outside_transaction?