diff options
author | sorah <sorah@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-06-16 11:24:23 +0000 |
---|---|---|
committer | sorah <sorah@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-06-16 11:24:23 +0000 |
commit | 288c18cdd8895d007458b6440d24b8949b4689e8 (patch) | |
tree | a32c4fef158f16629cd8f20817c668ec39642131 /lib/test/unit | |
parent | a15dfa6b4a0c8afc0fd47a5d1b6c7d12191e38fa (diff) | |
download | ruby-288c18cdd8895d007458b6440d24b8949b4689e8.tar.gz |
* test/testunit/test_parallel.rb: Fix Regexp for test.
* test/testunit/tests_for_parallel/test_third.rb: Use
Test::Unit::TestCase#on_parallel_worker? for detecting worker.
* lib/test/unit/testcase.rb(Test::Unit::TestCase#on_parallel_worker?):
New Method Test::Unit::TestCase#on_parallel_worker? returns true
when a testcase is running on parallel worker.
* lib/test/unit/parallel.rb(Test::Unit::TestCase#on_parallel_worker?):
ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32123 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/test/unit')
-rw-r--r-- | lib/test/unit/parallel.rb | 6 | ||||
-rw-r--r-- | lib/test/unit/testcase.rb | 4 |
2 files changed, 10 insertions, 0 deletions
diff --git a/lib/test/unit/parallel.rb b/lib/test/unit/parallel.rb index deda1d1ef5..ab9e864509 100644 --- a/lib/test/unit/parallel.rb +++ b/lib/test/unit/parallel.rb @@ -2,6 +2,12 @@ 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 diff --git a/lib/test/unit/testcase.rb b/lib/test/unit/testcase.rb index f3d77744eb..02f0f97987 100644 --- a/lib/test/unit/testcase.rb +++ b/lib/test/unit/testcase.rb @@ -8,6 +8,10 @@ module Test class TestCase < MiniTest::Unit::TestCase include Assertions + def on_parallel_worker? + false + end + def run runner @options = runner.options super runner |