summaryrefslogtreecommitdiff
path: root/test/rake/helper.rb
diff options
context:
space:
mode:
authordrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-11-15 21:59:37 +0000
committerdrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-11-15 21:59:37 +0000
commit9c66bad9f3d522d50d4a45ef8a3a92abbf93229f (patch)
tree8fc1ae219e41bdd711442b1d35149da4f45dfa8a /test/rake/helper.rb
parentbfc95c6e1639edc909338ef4d20d990caf6f630e (diff)
downloadruby-9c66bad9f3d522d50d4a45ef8a3a92abbf93229f.tar.gz
* lib/rake*: Updated to rake 0.9.3
* test/rake*: ditto * bin/rake: ditto * NEWS: ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37664 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/rake/helper.rb')
-rw-r--r--test/rake/helper.rb30
1 files changed, 30 insertions, 0 deletions
diff --git a/test/rake/helper.rb b/test/rake/helper.rb
index 65443fc111..5a373d3043 100644
--- a/test/rake/helper.rb
+++ b/test/rake/helper.rb
@@ -1,4 +1,5 @@
require 'rubygems'
+$:.unshift File.expand_path('../../lib', __FILE__)
begin
gem 'minitest'
@@ -488,5 +489,34 @@ end
VERBOSE
end
+ def rakefile_test_signal
+ rakefile <<-TEST_SIGNAL
+require 'rake/testtask'
+
+Rake::TestTask.new(:a) do |t|
+ t.test_files = ['a_test.rb']
+end
+
+Rake::TestTask.new(:b) do |t|
+ t.test_files = ['b_test.rb']
+end
+
+task :test do
+ Rake::Task[:a].invoke rescue nil
+ Rake::Task[:b].invoke rescue nil
end
+task :default => :test
+ TEST_SIGNAL
+ open 'a_test.rb', 'w' do |io|
+ io << 'puts "ATEST"' << "\n"
+ io << '$stdout.flush' << "\n"
+ io << 'Process.kill("TERM", $$)' << "\n"
+ end
+ open 'b_test.rb', 'w' do |io|
+ io << 'puts "BTEST"' << "\n"
+ io << '$stdout.flush' << "\n"
+ end
+ end
+
+end