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:
parent
889f61efff
commit
361d2ff615
1 changed files with 8 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue