diff options
author | Yoong Kang Lim <yoongkang.lim@gmail.com> | 2015-05-26 22:09:22 +1000 |
---|---|---|
committer | Godfrey Chan <godfreykfc@gmail.com> | 2015-05-30 00:44:12 -0700 |
commit | 0cb327c549282548639696f86aeac97a4e48e9f1 (patch) | |
tree | 68892974178b78cc3566578438862934266feffc /railties/test/application | |
parent | f06ce4c12a396795a3b2c1812951d9277bcb3a82 (diff) | |
download | rails-0cb327c549282548639696f86aeac97a4e48e9f1.tar.gz rails-0cb327c549282548639696f86aeac97a4e48e9f1.tar.bz2 rails-0cb327c549282548639696f86aeac97a4e48e9f1.zip |
Add test to ensure tmp:clear works when tmp is missing
See #20299.
Diffstat (limited to 'railties/test/application')
-rw-r--r-- | railties/test/application/rake_test.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/railties/test/application/rake_test.rb b/railties/test/application/rake_test.rb index de14f269df..dd26ec867d 100644 --- a/railties/test/application/rake_test.rb +++ b/railties/test/application/rake_test.rb @@ -285,5 +285,12 @@ 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) { `bundle exec rake tmp:clear` } + assert_predicate $?, :success? + assert_empty errormsg + end end end |