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 CHANGED
@@ -1,3 +1,8 @@
1
+ === 2.1.2 / 2010-11-25
2
+
3
+ * 1 enhanchement
4
+ * support auto runner prepare hook.
5
+
1
6
  === 2.1.1 / 2010-07-29
2
7
 
3
8
  * 1 bug fix
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.1 is the latest release. It had been released at 2010-07-29.
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
@@ -91,7 +91,7 @@ require "test/unit"</pre>
91
91
  </p>
92
92
  <h3 id="test-unit-latest">test-unit最新リリース</h3>
93
93
  <p>
94
- 2010-07-29にリリースされた2.1.1が最新リリースです。
94
+ 2010-11-25にリリースされた2.1.2が最新リリースです。
95
95
  </p>
96
96
  <h3 id="test-unit-install">test-unitのインストール</h3>
97
97
  <p>
@@ -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)
@@ -2,6 +2,6 @@
2
2
  # HACK: quick and dirty to get integrated into the new project - ryan
3
3
  module Test
4
4
  module Unit
5
- VERSION = '2.1.1'
5
+ VERSION = '2.1.2'
6
6
  end
7
7
  end
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: 9
4
+ hash: 15
5
5
  prerelease: false
6
6
  segments:
7
7
  - 2
8
8
  - 1
9
- - 1
10
- version: 2.1.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-07-29 00:00:00 +09:00
19
+ date: 2010-11-25 00:00:00 +09:00
20
20
  default_executable:
21
21
  dependencies:
22
22
  - !ruby/object:Gem::Dependency