diff options
author | Michael Koziarski <michael@koziarski.com> | 2007-05-18 01:02:08 +0000 |
---|---|---|
committer | Michael Koziarski <michael@koziarski.com> | 2007-05-18 01:02:08 +0000 |
commit | ebbe4fb0d41feb45628715cd045d89e7bb8ab117 (patch) | |
tree | 17f6be68062031849929fac182e8cbb99b58c4ca /activerecord/test/transactions_test.rb | |
parent | 1ac7cd56fe4b49f0d30c96b2ec68abde8b05ee18 (diff) | |
download | rails-ebbe4fb0d41feb45628715cd045d89e7bb8ab117.tar.gz rails-ebbe4fb0d41feb45628715cd045d89e7bb8ab117.tar.bz2 rails-ebbe4fb0d41feb45628715cd045d89e7bb8ab117.zip |
Replace the transaction {|transaction|..} semantics with a new Exception ActiveRecord::Rollback. Closes #8030 [Koz]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6754 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activerecord/test/transactions_test.rb')
-rw-r--r-- | activerecord/test/transactions_test.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/activerecord/test/transactions_test.rb b/activerecord/test/transactions_test.rb index 098e01c945..c23f405914 100644 --- a/activerecord/test/transactions_test.rb +++ b/activerecord/test/transactions_test.rb @@ -149,13 +149,13 @@ class TransactionTest < Test::Unit::TestCase end def test_manually_rolling_back_a_transaction - Topic.transaction do |transaction| + Topic.transaction do @first.approved = true @second.approved = false @first.save @second.save - transaction.rollback! + raise ActiveRecord::Rollback end assert @first.approved?, "First should still be changed in the objects" |