diff options
author | drbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-10-11 21:35:01 +0000 |
---|---|---|
committer | drbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-10-11 21:35:01 +0000 |
commit | 9cadc95b28da1cf6ca8f802292d12cc96a4f2c2d (patch) | |
tree | 73280968d3426b31c5d0b9da1d3e558aa6f9fcb9 /lib/rake/testtask.rb | |
parent | 52c1331763d8b9b8d6362987e6f8847b65ed7f57 (diff) | |
download | ruby-9cadc95b28da1cf6ca8f802292d12cc96a4f2c2d.tar.gz |
* NEWS (with all sufficient information):
* lib/rake: Update to rake 10.1.0
* bin/rake: ditto.
* test/rake: ditto.
* NEWS: Update NEWS to include rake 10.1.0 and links to release notes.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43264 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/rake/testtask.rb')
-rw-r--r-- | lib/rake/testtask.rb | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/lib/rake/testtask.rb b/lib/rake/testtask.rb index ff4ef3b988..c693dd2626 100644 --- a/lib/rake/testtask.rb +++ b/lib/rake/testtask.rb @@ -64,7 +64,7 @@ module Rake # attr_accessor :loader - # Array of commandline options to pass to Ruby when running test loader. + # Array of commandline options to pass to ruby when running test loader. attr_accessor :ruby_opts # Explicitly define the list of test files to be included in a @@ -93,15 +93,18 @@ module Rake # Create the tasks defined by this task lib. def define - desc "Run tests" + (@name==:test ? "" : " for #{@name}") + desc "Run tests" + (@name == :test ? "" : " for #{@name}") task @name do FileUtilsExt.verbose(@verbose) do - args = "#{ruby_opts_string} #{run_code} #{file_list_string} #{option_list}" + args = + "#{ruby_opts_string} #{run_code} " + + "#{file_list_string} #{option_list}" ruby args do |ok, status| if !ok && status.respond_to?(:signaled?) && status.signaled? raise SignalException.new(status.termsig) elsif !ok - fail "Command failed with status (#{status.exitstatus}): [ruby #{args}]" + fail "Command failed with status (#{status.exitstatus}): " + + "[ruby #{args}]" end end end @@ -120,8 +123,8 @@ module Rake def ruby_opts_string opts = @ruby_opts.dup - opts.unshift( "-I\"#{lib_path}\"" ) unless @libs.empty? - opts.unshift( "-w" ) if @warning + opts.unshift("-I\"#{lib_path}\"") unless @libs.empty? + opts.unshift("-w") if @warning opts.join(" ") end @@ -130,12 +133,12 @@ module Rake end def file_list_string - file_list.collect { |fn| "\"#{fn}\"" }.join(' ') + file_list.map { |fn| "\"#{fn}\"" }.join(' ') end def file_list # :nodoc: if ENV['TEST'] - FileList[ ENV['TEST'] ] + FileList[ENV['TEST']] else result = [] result += @test_files.to_a if @test_files |