提交 b3f8cde0 编写于 作者: K Kasper Timm Hansen 提交者: GitHub

Merge pull request #29656 from y-yagi/move_tmp_clear_test

Move test related to `tmp:clear` task to `tmp_test.rb`
......@@ -31,6 +31,13 @@ def teardown
assert_not File.exist?("tmp/screenshots/fail.png")
end
end
test "tmp:clear should work if folder missing" do
FileUtils.remove_dir("#{app_path}/tmp")
errormsg = Dir.chdir(app_path) { `bin/rails tmp:clear` }
assert_predicate $?, :success?
assert_empty errormsg
end
end
end
end
......@@ -391,12 +391,5 @@ def test_template_load_initializers
assert_match(/Hello, World!/, output)
end
def test_tmp_clear_should_work_if_folder_missing
FileUtils.remove_dir("#{app_path}/tmp")
errormsg = Dir.chdir(app_path) { `bin/rails tmp:clear` }
assert_predicate $?, :success?
assert_empty errormsg
end
end
end
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册