From 33b0dbe40729ba130c3c83391a3d9581c2a8b034 Mon Sep 17 00:00:00 2001 From: Prathamesh Sonpatki Date: Fri, 12 Feb 2016 19:46:03 +0530 Subject: 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. --- activerecord/test/cases/migration/compatibility_test.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'activerecord/test/cases/migration') diff --git a/activerecord/test/cases/migration/compatibility_test.rb b/activerecord/test/cases/migration/compatibility_test.rb index d8f5b33542..60ca90464d 100644 --- a/activerecord/test/cases/migration/compatibility_test.rb +++ b/activerecord/test/cases/migration/compatibility_test.rb @@ -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 -- cgit v1.2.3