提交 d5dbc037 编写于 作者: A Aaron Patterson

test should clean up after themselves

上级 314e2cc0
......@@ -63,6 +63,7 @@ def teardown
def test_migrator_versions
migrations_path = MIGRATIONS_ROOT + "/valid"
old_path = ActiveRecord::Migrator.migrations_paths
ActiveRecord::Migrator.migrations_paths = migrations_path
ActiveRecord::Migrator.up(migrations_path)
......@@ -74,6 +75,8 @@ def test_migrator_versions
assert_equal 0, ActiveRecord::Migrator.current_version
assert_equal 3, ActiveRecord::Migrator.last_version
assert_equal true, ActiveRecord::Migrator.needs_migration?
ensure
ActiveRecord::Migrator.migrations_paths = old_path
end
def test_create_table_with_force_true_does_not_drop_nonexisting_table
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册