1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* test/testunit/tests_for_parallel/misc.rb: Fix bug in r30947.

* lib/test/unit.rb, lib/test/unit/assertions.rb: For this test.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30948 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
sorah 2011-02-24 01:08:51 +00:00
parent 48fa6ed529
commit e9c22a6f1a
4 changed files with 43 additions and 21 deletions

View file

@ -1,3 +1,8 @@
Thu Feb 24 10:05:55 2011 Shota Fukumori (sora_h) <sorah@tubusu.net>
* test/testunit/tests_for_parallel/misc.rb: Fix bug in r30947.
* lib/test/unit.rb, lib/test/unit/assertions.rb: For this test.
Wed Feb 23 23:07:38 2011 Shota Fukumori (sora_h) <sorah@tubusu.net>
* test/testunit/test_parallel.rb, test/testunit/parallel/*:

View file

@ -32,6 +32,7 @@ module Test
module Options
def initialize(*, &block)
@init_hook = block
@options = nil
super(&nil)
end
@ -232,6 +233,11 @@ module Test
alias orig_run_anything _run_anything
undef _run_anything
undef options
def options
@optss ||= (@options||{}).merge(@opts)
end
def _run_anything type
if @opts[:parallel] && @warnings

View file

@ -7,6 +7,12 @@ module Test
class TestCase < MiniTest::Unit::TestCase
include Assertions
def run runner
@options = runner.options
super runner
end
def self.test_order
:sorted
end

View file

@ -1,3 +1,7 @@
# FIXME: more portability code
if caller(7) && /block in non_options/ =~ caller(7)[0]
class TestCaseForParallelTest < Test::Unit::TestCase;end
else
module Test
module Unit
class Worker
@ -29,3 +33,4 @@ class TestCaseForParallelTest < Test::Unit::TestCase
end
end
end
end