test-unit 2.4.6 → 2.4.7
Sign up to get free protection for your applications and to get access to all the features.
- data/README.textile +4 -4
- data/lib/test/unit/pending.rb +2 -2
- data/lib/test/unit/ui/console/testrunner.rb +12 -6
- data/lib/test/unit/version.rb +1 -1
- metadata +6 -6
data/README.textile
CHANGED
@@ -1,15 +1,15 @@
|
|
1
|
-
h1. test-unit
|
1
|
+
h1. test-unit
|
2
2
|
|
3
3
|
http://rubyforge.org/projects/test-unit/
|
4
4
|
|
5
5
|
h2. Description
|
6
6
|
|
7
|
-
test-unit
|
7
|
+
test-unit - Improved version of Test::Unit bundled in Ruby
|
8
8
|
1.8.x.
|
9
9
|
|
10
10
|
Ruby 1.9.x bundles minitest not Test::Unit. Test::Unit
|
11
11
|
bundled in Ruby 1.8.x had not been improved but unbundled
|
12
|
-
Test::Unit (test-unit
|
12
|
+
Test::Unit (test-unit) will be improved actively.
|
13
13
|
|
14
14
|
h2. Features
|
15
15
|
|
@@ -19,7 +19,7 @@ h2. Features
|
|
19
19
|
stand-alone package. (The test framework in ruby is going
|
20
20
|
to radically change very soon).
|
21
21
|
|
22
|
-
* test-unit
|
22
|
+
* test-unit will be improved actively and may break
|
23
23
|
compatiblity with Test::Unit 1.2.3. (We will not hope it
|
24
24
|
if it isn't needed.)
|
25
25
|
|
data/lib/test/unit/pending.rb
CHANGED
@@ -112,8 +112,8 @@ module Test
|
|
112
112
|
def handle_pended_error(exception)
|
113
113
|
return false unless exception.is_a?(PendedError)
|
114
114
|
pending = Pending.new(name,
|
115
|
-
|
116
|
-
|
115
|
+
filter_backtrace(exception.backtrace),
|
116
|
+
exception.message)
|
117
117
|
add_pending(pending)
|
118
118
|
true
|
119
119
|
end
|
@@ -172,18 +172,24 @@ module Test
|
|
172
172
|
fault.inspected_expected and fault.inspected_actual
|
173
173
|
output_single(fault.label, fault_color(fault))
|
174
174
|
output(":")
|
175
|
+
output(fault.test_name)
|
175
176
|
output_fault_backtrace(fault)
|
176
177
|
output_fault_message(fault)
|
177
178
|
else
|
178
|
-
label,
|
179
|
-
|
180
|
-
|
179
|
+
output_single(fault.label, fault_color(fault))
|
180
|
+
if fault.is_a?(Error)
|
181
|
+
output(": #{fault.test_name}")
|
182
|
+
output(fault.message)
|
183
|
+
else
|
184
|
+
output(": #{fault.message}")
|
185
|
+
output(fault.test_name)
|
186
|
+
end
|
187
|
+
output_fault_backtrace(fault)
|
181
188
|
end
|
182
189
|
end
|
183
190
|
|
184
191
|
def output_fault_backtrace(fault)
|
185
192
|
backtrace = fault.location
|
186
|
-
output(fault.test_name)
|
187
193
|
backtrace.each_with_index do |entry, i|
|
188
194
|
output(entry)
|
189
195
|
output_code_snippet(entry, fault_color(fault)) if i.zero?
|
@@ -193,8 +199,8 @@ module Test
|
|
193
199
|
def output_code_snippet(entry, target_line_color=nil)
|
194
200
|
return unless /\A(.*):(\d+)/ =~ entry
|
195
201
|
file = $1
|
196
|
-
|
197
|
-
lines = @code_snippet_fetcher.fetch(file,
|
202
|
+
line_number = $2.to_i
|
203
|
+
lines = @code_snippet_fetcher.fetch(file, line_number)
|
198
204
|
max_n = lines.collect {|n, line, attributes| n}.max
|
199
205
|
digits = (Math.log10(max_n) + 1).truncate
|
200
206
|
lines.each do |n, line, attributes|
|
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: 17
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 2
|
8
8
|
- 4
|
9
|
-
-
|
10
|
-
version: 2.4.
|
9
|
+
- 7
|
10
|
+
version: 2.4.7
|
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: 2012-02-
|
19
|
+
date: 2012-02-10 00:00:00 Z
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
22
22
|
version_requirements: &id001 !ruby/object:Gem::Requirement
|
@@ -63,7 +63,7 @@ dependencies:
|
|
63
63
|
description: |
|
64
64
|
Ruby 1.9.x bundles minitest not Test::Unit. Test::Unit
|
65
65
|
bundled in Ruby 1.8.x had not been improved but unbundled
|
66
|
-
Test::Unit (test-unit
|
66
|
+
Test::Unit (test-unit) will be improved actively.
|
67
67
|
|
68
68
|
email:
|
69
69
|
- kou@cozmixng.org
|
@@ -194,6 +194,6 @@ rubyforge_project: test-unit
|
|
194
194
|
rubygems_version: 1.8.15
|
195
195
|
signing_key:
|
196
196
|
specification_version: 3
|
197
|
-
summary: test-unit
|
197
|
+
summary: test-unit - Improved version of Test::Unit bundled in Ruby 1.8.x.
|
198
198
|
test_files: []
|
199
199
|
|