1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

fix order dependent test

`ReflectionTest` uses column information in tests and those tests break
if tests are run in random order.
This commit is contained in:
Neeraj Singh 2013-07-28 11:46:02 +05:30
parent bffda1e65e
commit 09beb9c292

View file

@ -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