blob: 11f34b6f51ae9e00034f8a7a4ddfb33a28c7d7c1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
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
Methods = {}
def self.method_added(name)
return unless name.to_s[/\Atest_/]
Methods[self] ||= {}
if Methods[self][name]
warn("test/unit warning: method #{ self }##{ name } is redefined")
end
Methods[self][name] = true
end
end
end
end
|