test-unit 2.1.1 → 2.1.2
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +5 -0
- data/html/index.html +1 -1
- data/html/index.html.ja +1 -1
- data/lib/test/unit/autorunner.rb +13 -1
- data/lib/test/unit/version.rb +1 -1
- metadata +4 -4
data/History.txt
CHANGED
data/html/index.html
CHANGED
@@ -78,7 +78,7 @@ require "test/unit"</pre>
|
|
78
78
|
</p>
|
79
79
|
<h3 id="test-unit-latest">test-unit: The latest release</h3>
|
80
80
|
<p>
|
81
|
-
2.1.
|
81
|
+
2.1.2 is the latest release. It had been released at 2010-11-25.
|
82
82
|
</p>
|
83
83
|
<h3 id="test-unit-install">test-unit: Install</h3>
|
84
84
|
<p>
|
data/html/index.html.ja
CHANGED
data/lib/test/unit/autorunner.rb
CHANGED
@@ -7,6 +7,7 @@ module Test
|
|
7
7
|
RUNNERS = {}
|
8
8
|
COLLECTORS = {}
|
9
9
|
ADDITIONAL_OPTIONS = []
|
10
|
+
PREPARE_HOOKS = []
|
10
11
|
|
11
12
|
class << self
|
12
13
|
def register_runner(id, runner_builder=Proc.new)
|
@@ -43,15 +44,20 @@ module Test
|
|
43
44
|
def setup_option(option_builder=Proc.new)
|
44
45
|
ADDITIONAL_OPTIONS << option_builder
|
45
46
|
end
|
47
|
+
|
48
|
+
def prepare(hook=Proc.new)
|
49
|
+
PREPARE_HOOKS << hook
|
50
|
+
end
|
46
51
|
end
|
47
52
|
|
48
53
|
def self.run(force_standalone=false, default_dir=nil, argv=ARGV, &block)
|
49
54
|
r = new(force_standalone || standalone?, &block)
|
50
55
|
r.base = default_dir
|
56
|
+
r.prepare
|
51
57
|
r.process_args(argv)
|
52
58
|
r.run
|
53
59
|
end
|
54
|
-
|
60
|
+
|
55
61
|
def self.standalone?
|
56
62
|
return false unless("-e" == $0)
|
57
63
|
ObjectSpace.each_object(Class) do |klass|
|
@@ -123,6 +129,12 @@ module Test
|
|
123
129
|
yield(self) if block_given?
|
124
130
|
end
|
125
131
|
|
132
|
+
def prepare
|
133
|
+
PREPARE_HOOKS.each do |handler|
|
134
|
+
handler.call(self)
|
135
|
+
end
|
136
|
+
end
|
137
|
+
|
126
138
|
def process_args(args = ARGV)
|
127
139
|
begin
|
128
140
|
args.unshift(*@default_arguments)
|
data/lib/test/unit/version.rb
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: test-unit
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 15
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 2
|
8
8
|
- 1
|
9
|
-
-
|
10
|
-
version: 2.1.
|
9
|
+
- 2
|
10
|
+
version: 2.1.2
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Kouhei Sutou
|
@@ -16,7 +16,7 @@ autorequire:
|
|
16
16
|
bindir: bin
|
17
17
|
cert_chain: []
|
18
18
|
|
19
|
-
date: 2010-
|
19
|
+
date: 2010-11-25 00:00:00 +09:00
|
20
20
|
default_executable:
|
21
21
|
dependencies:
|
22
22
|
- !ruby/object:Gem::Dependency
|