Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

fix order dependent test

`ReflectionTest` uses column information in tests and those tests break
if tests are run in random order.
  • Loading branch information...
commit 09beb9c292da55158b9f966bf3ae0a583e2bfe7b 1 parent bffda1e
@neerajdotname neerajdotname authored
Showing with 5 additions and 0 deletions.
  1. +5 −0 activerecord/test/cases/transactions_test.rb
View
5 activerecord/test/cases/transactions_test.rb
@@ -453,6 +453,11 @@ def test_sqlite_add_column_in_transaction
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
Please sign in to comment.
Something went wrong with that request. Please try again.