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

Fixing test order issues

This commit is contained in:
Rafael Mendonça França 2014-05-19 14:35:33 -03:00
parent 889f61efff
commit 361d2ff615

View file

@ -26,17 +26,23 @@ class PostgresqlExtensionMigrationTest < ActiveRecord::TestCase
return skip("no extension support")
end
@old_schema_migration_tabel_name = ActiveRecord::SchemaMigration.table_name
@old_tabel_name_prefix = ActiveRecord::Base.table_name_prefix
@old_tabel_name_suffix = ActiveRecord::Base.table_name_suffix
ActiveRecord::Base.table_name_prefix = "p_"
ActiveRecord::Base.table_name_suffix = "_s"
ActiveRecord::SchemaMigration.delete_all rescue nil
ActiveRecord::SchemaMigration.table_name = "p_schema_migrations_s"
ActiveRecord::Migration.verbose = false
end
def teardown
ActiveRecord::Base.table_name_prefix = ""
ActiveRecord::Base.table_name_suffix = ""
ActiveRecord::Base.table_name_prefix = @old_tabel_name_prefix
ActiveRecord::Base.table_name_suffix = @old_tabel_name_suffix
ActiveRecord::SchemaMigration.delete_all rescue nil
ActiveRecord::Migration.verbose = true
ActiveRecord::SchemaMigration.table_name = @old_schema_migration_tabel_name
super
end