aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/transactions_test.rb
diff options
context:
space:
mode:
authorAkira Matsuda <ronnie@dio.jp>2013-11-13 05:11:00 +0900
committerAkira Matsuda <ronnie@dio.jp>2013-11-13 19:21:40 +0900
commita99b81e44fac8fd60e56420d0505768c2a318443 (patch)
tree9746ab998b68b039822e3a1a054be1048f68dec8 /activerecord/test/cases/transactions_test.rb
parent49245f37f7fc60bea5862aae1c9f8e1f1475872d (diff)
downloadrails-a99b81e44fac8fd60e56420d0505768c2a318443.tar.gz
rails-a99b81e44fac8fd60e56420d0505768c2a318443.tar.bz2
rails-a99b81e44fac8fd60e56420d0505768c2a318443.zip
Ensure that a column added in a test is being removed after all
Diffstat (limited to 'activerecord/test/cases/transactions_test.rb')
-rw-r--r--activerecord/test/cases/transactions_test.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/activerecord/test/cases/transactions_test.rb b/activerecord/test/cases/transactions_test.rb
index cda4e7453b..89dab16975 100644
--- a/activerecord/test/cases/transactions_test.rb
+++ b/activerecord/test/cases/transactions_test.rb
@@ -485,6 +485,13 @@ class TransactionTest < ActiveRecord::TestCase
raise ActiveRecord::Rollback
end
end
+ ensure
+ begin
+ Topic.connection.remove_column('topics', 'stuff')
+ rescue
+ ensure
+ Topic.reset_column_information
+ end
end
def test_transactions_state_from_rollback