diff options
author | Jonathan Viney <jonathan.viney@gmail.com> | 2008-07-02 16:01:26 +1200 |
---|---|---|
committer | Michael Koziarski <michael@koziarski.com> | 2008-07-15 21:25:12 +0200 |
commit | 4f72feb84c25b54f66c7192c788b7fd965f2d493 (patch) | |
tree | caa8cf9cb15c786dc627e438122da822986d8f6e /activerecord/test/cases/fixtures_test.rb | |
parent | 24a8ae4e08fcd15a8c3792990d1d0981d004d339 (diff) | |
download | rails-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-x | activerecord/test/cases/fixtures_test.rb | 6 |
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 |