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

Fix random failures of tests on Travis

- Tests on Travis are randomly failing because schema_migrations table
  does not exist in teardown block.
- Also checked that all other places where we have used
  `ActiveRecord::SchemaMigration.delete_all` we have rescued it, so used
  it here also. This failure was not specifically related to the test
  added in this PR but to overall compatibility migration tests, so
  adding as separate commit.
This commit is contained in:
Prathamesh Sonpatki 2016-02-12 19:46:03 +05:30
parent 5d643d365e
commit 33b0dbe407

View file

@ -21,7 +21,7 @@ module ActiveRecord
teardown do
connection.drop_table :testings rescue nil
ActiveRecord::Migration.verbose = @verbose_was
ActiveRecord::SchemaMigration.delete_all
ActiveRecord::SchemaMigration.delete_all rescue nil
end
def test_migration_doesnt_remove_named_index