mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
288c18cdd8
* 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
25 lines
433 B
Ruby
25 lines
433 B
Ruby
require 'test/unit/assertions'
|
|
|
|
module Test
|
|
module Unit
|
|
# remove silly TestCase class
|
|
remove_const(:TestCase) if defined?(self::TestCase)
|
|
|
|
class TestCase < MiniTest::Unit::TestCase
|
|
include Assertions
|
|
|
|
def on_parallel_worker?
|
|
false
|
|
end
|
|
|
|
def run runner
|
|
@options = runner.options
|
|
super runner
|
|
end
|
|
|
|
def self.test_order
|
|
:sorted
|
|
end
|
|
end
|
|
end
|
|
end
|