summaryrefslogtreecommitdiff
path: root/lib/test/unit/parallel.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/test/unit/parallel.rb')
-rw-r--r--lib/test/unit/parallel.rb20
1 files changed, 13 insertions, 7 deletions
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