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

disable migrations logging while running test cases for AR schema tests

This commit is contained in:
Kuldeep Aggarwal 2014-09-06 21:44:08 +05:30
parent da2f61947d
commit 5663f06656

View file

@ -6,6 +6,7 @@ if ActiveRecord::Base.connection.supports_migrations?
self.use_transactional_fixtures = false self.use_transactional_fixtures = false
def setup def setup
ActiveRecord::Migration.verbose = false
@connection = ActiveRecord::Base.connection @connection = ActiveRecord::Base.connection
ActiveRecord::SchemaMigration.drop_table ActiveRecord::SchemaMigration.drop_table
end end
@ -16,6 +17,7 @@ if ActiveRecord::Base.connection.supports_migrations?
@connection.drop_table :nep_schema_migrations rescue nil @connection.drop_table :nep_schema_migrations rescue nil
@connection.drop_table :has_timestamps rescue nil @connection.drop_table :has_timestamps rescue nil
ActiveRecord::SchemaMigration.delete_all rescue nil ActiveRecord::SchemaMigration.delete_all rescue nil
ActiveRecord::Migration.verbose = true
end end
def test_has_no_primary_key def test_has_no_primary_key