From 3908d5d3303dbd3f20f106aa71b5c094b67ac577 Mon Sep 17 00:00:00 2001 From: drbrain Date: Tue, 25 Nov 2014 07:03:36 +0000 Subject: * lib/rake: Update to rake 10.4.0 * test/rake: ditto. * NEWS: ditto. * test/lib/minitest/unit.rb: Add compatibility shim for minitest 5. This only provides minitest 5 unit test naming compatibility. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48560 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/rake/test_rake_application.rb | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (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 f52040471b..19e5005989 100644 --- a/test/rake/test_rake_application.rb +++ b/test/rake/test_rake_application.rb @@ -10,9 +10,9 @@ class TestRakeApplication < Rake::TestCase end def setup_command_line(*options) - ARGV.clear + @app.argv.clear options.each do |option| - ARGV << option + @app.argv << option end end @@ -268,7 +268,7 @@ class TestRakeApplication < Rake::TestCase end def test_load_rakefile_not_found - ARGV.clear + @app.argv.clear Dir.chdir @tempdir ENV['RAKE_SYSTEM'] = 'not_exist' @@ -378,7 +378,7 @@ class TestRakeApplication < Rake::TestCase @app.handle_options - assert !ARGV.include?(valid_option) + assert !@app.argv.include?(valid_option) assert @app.options.trace end @@ -406,14 +406,14 @@ class TestRakeApplication < Rake::TestCase setup_command_line("--trace", "sometask") @app.handle_options - assert ARGV.include?("sometask") + assert @app.argv.include?("sometask") assert @app.options.trace end def test_good_run ran = false - ARGV << '--rakelib=""' + @app.argv << '--rakelib=""' @app.options.silent = true @@ -468,7 +468,7 @@ class TestRakeApplication < Rake::TestCase } assert_match(/see full trace/i, err) ensure - ARGV.clear + @app.argv.clear end def test_bad_run_with_trace @@ -479,7 +479,7 @@ class TestRakeApplication < Rake::TestCase } refute_match(/see full trace/i, err) ensure - ARGV.clear + @app.argv.clear end def test_bad_run_with_backtrace @@ -492,7 +492,7 @@ class TestRakeApplication < Rake::TestCase } refute_match(/see full trace/, err) ensure - ARGV.clear + @app.argv.clear end CustomError = Class.new(RuntimeError) @@ -549,7 +549,7 @@ class TestRakeApplication < Rake::TestCase end assert_match(/Secondary Error/, err) ensure - ARGV.clear + @app.argv.clear end def test_run_with_bad_options @@ -559,7 +559,7 @@ class TestRakeApplication < Rake::TestCase capture_io { @app.run } } ensure - ARGV.clear + @app.argv.clear end def test_standard_exception_handling_invalid_option -- cgit v1.2.3