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:
parent
bffda1e65e
commit
09beb9c292
1 changed files with 5 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue