diff options
author | Kasper Timm Hansen <kaspth@gmail.com> | 2017-07-02 10:51:02 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-07-02 10:51:02 +0200 |
commit | b3f8cde0f28d929263296ad7e5bd929b8c5a600e (patch) | |
tree | 3e327048036b67ecaadd46b18e909cef8bffd566 | |
parent | 0237da287eb4c507d10a0c6d94150093acc52b03 (diff) | |
parent | 06b1e5f5076961a85e354714490528d6b342c725 (diff) | |
download | rails-b3f8cde0f28d929263296ad7e5bd929b8c5a600e.tar.gz rails-b3f8cde0f28d929263296ad7e5bd929b8c5a600e.tar.bz2 rails-b3f8cde0f28d929263296ad7e5bd929b8c5a600e.zip |
Merge pull request #29656 from y-yagi/move_tmp_clear_test
Move test related to `tmp:clear` task to `tmp_test.rb`
-rw-r--r-- | railties/test/application/rake/tmp_test.rb | 7 | ||||
-rw-r--r-- | railties/test/application/rake_test.rb | 7 |
2 files changed, 7 insertions, 7 deletions
diff --git a/railties/test/application/rake/tmp_test.rb b/railties/test/application/rake/tmp_test.rb index bc9865b0de..8423a98f84 100644 --- a/railties/test/application/rake/tmp_test.rb +++ b/railties/test/application/rake/tmp_test.rb @@ -31,6 +31,13 @@ module ApplicationTests 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 diff --git a/railties/test/application/rake_test.rb b/railties/test/application/rake_test.rb index 1b64a0a1ca..5ae6ea925f 100644 --- a/railties/test/application/rake_test.rb +++ b/railties/test/application/rake_test.rb @@ -391,12 +391,5 @@ module ApplicationTests 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 |