From 09beb9c292da55158b9f966bf3ae0a583e2bfe7b Mon Sep 17 00:00:00 2001 From: Neeraj Singh Date: Sun, 28 Jul 2013 11:46:02 +0530 Subject: fix order dependent test `ReflectionTest` uses column information in tests and those tests break if tests are run in random order. --- activerecord/test/cases/transactions_test.rb | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'activerecord/test/cases/transactions_test.rb') diff --git a/activerecord/test/cases/transactions_test.rb b/activerecord/test/cases/transactions_test.rb index 9c5f2e4724..f84088def3 100644 --- a/activerecord/test/cases/transactions_test.rb +++ b/activerecord/test/cases/transactions_test.rb @@ -453,6 +453,11 @@ class TransactionTest < ActiveRecord::TestCase raise ActiveRecord::Rollback end end + + ensure + Topic.reset_column_information # reset the column information to get correct reading + Topic.connection.remove_column('topics', 'stuff') if Topic.column_names.include?('stuff') + Topic.reset_column_information # reset the column information again for other tests end def test_transactions_state_from_rollback -- cgit v1.2.3