aboutsummaryrefslogtreecommitdiffstats
path: root/test/rake/test_rake_file_utils.rb
diff options
context:
space:
mode:
authordrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-06-28 02:45:29 +0000
committerdrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-06-28 02:45:29 +0000
commit2619f216fef06c9fca948ca729a0e23b62996f09 (patch)
tree01c462490ba269df417fad115570ace6a765a25f /test/rake/test_rake_file_utils.rb
parent84ece951630c61eddab8be47b80fc1a7f774175f (diff)
downloadruby-2619f216fef06c9fca948ca729a0e23b62996f09.tar.gz
* lib/rake: Update rake to fix some bugs and hide deprecated features
from RDoc. * lib/rake/version.rb: Bump version to 0.9.2.1 to distinguish it from the released version. * NEWS: ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32265 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/rake/test_rake_file_utils.rb')
-rw-r--r--test/rake/test_rake_file_utils.rb19
1 files changed, 17 insertions, 2 deletions
diff --git a/test/rake/test_rake_file_utils.rb b/test/rake/test_rake_file_utils.rb
index fb7a4a5307..0f5ad3e7ab 100644
--- a/test/rake/test_rake_file_utils.rb
+++ b/test/rake/test_rake_file_utils.rb
@@ -6,6 +6,7 @@ class TestRakeFileUtils < Rake::TestCase
def teardown
FileUtils::LN_SUPPORTED[0] = true
+ RakeFileUtils.verbose_flag = Rake::FileUtilsExt::DEFAULT
super
end
@@ -101,7 +102,11 @@ class TestRakeFileUtils < Rake::TestCase
def test_file_utils_methods_are_available_at_top_level
create_file("a")
- rm_rf "a"
+
+ capture_io do
+ rm_rf "a"
+ end
+
refute File.exist?("a")
end
@@ -208,7 +213,7 @@ class TestRakeFileUtils < Rake::TestCase
assert_equal "shellcommand.rb\n", err
end
- def test_sh_no_verbose
+ def test_sh_verbose_false
shellcommand
_, err = capture_io do
@@ -220,6 +225,16 @@ class TestRakeFileUtils < Rake::TestCase
assert_equal '', err
end
+ def test_sh_verbose_flag_nil
+ shellcommand
+
+ RakeFileUtils.verbose_flag = nil
+
+ assert_silent do
+ sh %{shellcommand.rb}, :noop=>true
+ end
+ end
+
def test_ruby_with_a_single_string_argument
check_expansion