From d1d4490a57413ff5cb7e8bd0274bb34c7da68d29 Mon Sep 17 00:00:00 2001 From: drbrain Date: Thu, 29 Nov 2012 19:16:46 +0000 Subject: * lib/rake/*: Updated to rake 0.9.5 * test/rake/*: ditto. * NEWS: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38003 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/rake/test_rake_application.rb | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) (limited to 'test/rake/test_rake_application.rb') diff --git a/test/rake/test_rake_application.rb b/test/rake/test_rake_application.rb index eb6d148a65..f2358552c8 100644 --- a/test/rake/test_rake_application.rb +++ b/test/rake/test_rake_application.rb @@ -309,6 +309,37 @@ class TestRakeApplication < Rake::TestCase assert @app.options.trace end + def test_handle_options_trace_default_is_stderr + ARGV.clear + ARGV << "--trace" + + @app.handle_options + + assert_equal STDERR, @app.options.trace_output + assert @app.options.trace + end + + def test_handle_options_trace_overrides_to_stdout + ARGV.clear + ARGV << "--trace=stdout" + + @app.handle_options + + assert_equal STDOUT, @app.options.trace_output + assert @app.options.trace + end + + def test_handle_options_trace_does_not_eat_following_task_names + assert !@app.options.trace + + ARGV.clear + ARGV << "--trace" << "sometask" + + @app.handle_options + assert ARGV.include?("sometask") + assert @app.options.trace + end + def test_good_run ran = false -- cgit v1.2.3