提交 06b1e5f5 编写于 作者: Y yuuji.yaginuma

Move test related to `tmp:clear` task to `tmp_test.rb`

上级 0237da28
......@@ -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.
先完成此消息的编辑!
想要评论请 注册