aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/fixtures_test.rb
diff options
context:
space:
mode:
authorJonathan Viney <jonathan.viney@gmail.com>2008-07-02 16:01:26 +1200
committerMichael Koziarski <michael@koziarski.com>2008-07-15 21:25:12 +0200
commit4f72feb84c25b54f66c7192c788b7fd965f2d493 (patch)
treecaa8cf9cb15c786dc627e438122da822986d8f6e /activerecord/test/cases/fixtures_test.rb
parent24a8ae4e08fcd15a8c3792990d1d0981d004d339 (diff)
downloadrails-4f72feb84c25b54f66c7192c788b7fd965f2d493.tar.gz
rails-4f72feb84c25b54f66c7192c788b7fd965f2d493.tar.bz2
rails-4f72feb84c25b54f66c7192c788b7fd965f2d493.zip
Move the transaction counter to the connection object rather than maintaining it on the current Thread.
Signed-off-by: Michael Koziarski <michael@koziarski.com> [#533 state:resolved]
Diffstat (limited to 'activerecord/test/cases/fixtures_test.rb')
-rwxr-xr-xactiverecord/test/cases/fixtures_test.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/activerecord/test/cases/fixtures_test.rb b/activerecord/test/cases/fixtures_test.rb
index 0ea24868f1..6ba7597f56 100755
--- a/activerecord/test/cases/fixtures_test.rb
+++ b/activerecord/test/cases/fixtures_test.rb
@@ -461,11 +461,11 @@ class FixturesBrokenRollbackTest < ActiveRecord::TestCase
alias_method :teardown, :blank_teardown
def test_no_rollback_in_teardown_unless_transaction_active
- assert_equal 0, Thread.current['open_transactions']
+ assert_equal 0, ActiveRecord::Base.connection.open_transactions
assert_raise(RuntimeError) { ar_setup_fixtures }
- assert_equal 0, Thread.current['open_transactions']
+ assert_equal 0, ActiveRecord::Base.connection.open_transactions
assert_nothing_raised { ar_teardown_fixtures }
- assert_equal 0, Thread.current['open_transactions']
+ assert_equal 0, ActiveRecord::Base.connection.open_transactions
end
private