summaryrefslogtreecommitdiff
path: root/test/rake/test_rake_functional.rb
diff options
context:
space:
mode:
authordrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-11-15 22:32:34 +0000
committerdrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-11-15 22:32:34 +0000
commit1b023030a88a35118875b068a1fd725c58a32083 (patch)
tree07bbdc25e71d98bfa4091f617d82fc87541364c5 /test/rake/test_rake_functional.rb
parente9c28d0fce1fa34bd83e910273981190932ebf63 (diff)
* lib/rake*: Updated to rake 0.9.4
http://rake.rubyforge.org/doc/release_notes/rake-0_9_4_rdoc.html for a list of changes in 0.9.4. * test/rake*: ditto * NEWS: ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37667 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/rake/test_rake_functional.rb')
-rw-r--r--test/rake/test_rake_functional.rb19
1 files changed, 18 insertions, 1 deletions
diff --git a/test/rake/test_rake_functional.rb b/test/rake/test_rake_functional.rb
index ad59f7b9f8..2b97927e4c 100644
--- a/test/rake/test_rake_functional.rb
+++ b/test/rake/test_rake_functional.rb
@@ -439,6 +439,21 @@ class TestRakeFunctional < Rake::TestCase
end
end
+ def test_failing_test_sets_exit_status
+ rakefile_failing_test_task
+ rake
+ assert_equal 1, @exit.exitstatus
+ end
+
+ def test_stand_alone_filelist
+ rakefile_stand_alone_filelist
+
+ run_ruby @ruby_options + ["stand_alone_filelist.rb"]
+
+ assert_match(/^stand_alone_filelist\.rb$/, @out)
+ assert_equal 0, @exit.exitstatus
+ end
+
private
# Run a shell Ruby command with command line options (using the
@@ -458,14 +473,16 @@ class TestRakeFunctional < Rake::TestCase
def run_ruby(option_list)
puts "COMMAND: [#{RUBY} #{option_list.join ' '}]" if @verbose
- inn, out, err = Open3.popen3(Gem.ruby, *option_list)
+ inn, out, err, wait = Open3.popen3(Gem.ruby, *option_list)
inn.close
@out = out.read
@err = err.read
+ @exit = wait.value
puts "OUTPUT: [#{@out}]" if @verbose
puts "ERROR: [#{@err}]" if @verbose
+ puts "EXIT: [#{@exit.inspect}]" if @verbose
puts "PWD: [#{Dir.pwd}]" if @verbose
end