diff options
-rw-r--r-- | ChangeLog | 8 | ||||
-rw-r--r-- | lib/test/unit/parallel.rb | 20 |
2 files changed, 21 insertions, 7 deletions
@@ -1,3 +1,11 @@ +Sun Jun 19 10:05:16 2011 Shota Fukumori <[email protected]> + + * lib/test/unit/parallel.rb: Override Test::Unit::TestCase#on_parallel_worker? + only when $0 == __FILE__. + + * lib/test/unit/parallel.rb: Run Test::Unit::Worker.run only when + $0 == __FILE__. + Sat Jun 18 23:59:24 2011 Nobuyoshi Nakada <[email protected]> * io.c (fill_cbuf): finish reading at EOF, and the readconv has diff --git a/lib/test/unit/parallel.rb b/lib/test/unit/parallel.rb index ab9e864509..7a7c73d4f2 100644 --- a/lib/test/unit/parallel.rb +++ b/lib/test/unit/parallel.rb @@ -2,12 +2,6 @@ require 'test/unit' module Test module Unit - class TestCase < MiniTest::Unit::TestCase - def on_parallel_worker? - true - end - end - class Worker < Runner class << self undef autorun @@ -148,4 +142,16 @@ module Test end end -Test::Unit::Worker.new.run(ARGV) +if $0 == __FILE__ + module Test + module Unit + class TestCase < MiniTest::Unit::TestCase + def on_parallel_worker? + true + end + end + end + end + + Test::Unit::Worker.new.run(ARGV) +end |