提交 10259c3e 编写于 作者: N Neeraj Singh

fix order dependent test related to migration

If the order in which tests are executed is changed then test fails.
This commit ensures that all migrations are run before ensuring that
there are no pending migration.
上级 bffda1e6
......@@ -846,6 +846,10 @@ def test_copying_migrations_to_empty_directory
end
def test_check_pending_with_stdlib_logger
migrations_path = MIGRATIONS_ROOT + "/valid"
ActiveRecord::Migrator.migrations_paths = migrations_path
ActiveRecord::Migrator.up migrations_path
old, ActiveRecord::Base.logger = ActiveRecord::Base.logger, ::Logger.new($stdout)
quietly do
assert_nothing_raised { ActiveRecord::Migration::CheckPending.new(Proc.new {}).call({}) }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册