Fixing test order issues

上级 889f61ef
......@@ -26,17 +26,23 @@ def setup
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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册