summaryrefslogtreecommitdiff
path: root/test/rake/test_rake_application.rb
diff options
context:
space:
mode:
authordrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-11-29 19:16:46 +0000
committerdrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-11-29 19:16:46 +0000
commitd1d4490a57413ff5cb7e8bd0274bb34c7da68d29 (patch)
tree70596346a7f5f13d846cda7353fb8474baf4ad7e /test/rake/test_rake_application.rb
parent40bae2f67c1160e1e59018c1003d014c60d1ee47 (diff)
* 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
Diffstat (limited to 'test/rake/test_rake_application.rb')
-rw-r--r--test/rake/test_rake_application.rb31
1 files changed, 31 insertions, 0 deletions
diff --git a/test/rake/test_rake_application.rb b/test/rake/test_rake_application.rb
index eb6d148..f235855 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