minitest-utils 0.5.7 → 0.5.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/minitest/utils/reporter.rb +18 -5
- data/lib/minitest/utils/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 21397dacbcfc6383a5b9c1fe546808df9408702e8836253fc290d5ec970b1759
|
4
|
+
data.tar.gz: ac528017206944beee38ce9cba466ad9978d9e16ec927b64c5a34bb7bbaf447a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7bb1a97708504fc146d9d84a7b20d4e7c5cbefce960eabc57add36e72b219da18597566b932a936b528bf6ce0880a8a3dc54b67cd77a02323b9fd3e02fe9c374
|
7
|
+
data.tar.gz: 5ac9e8d3e430f946126c877c1f029a5e0761651b4680b7ef096a2140fe55cbedc284f1e428d310160b8f561001dcc44e287e77537ba36e4666265c4e0f1eb05d
|
@@ -140,25 +140,38 @@ module Minitest
|
|
140
140
|
message = result.failure.message
|
141
141
|
message = message.lines.tap(&:pop).join.chomp if result.error?
|
142
142
|
|
143
|
+
test = find_test_info(result)
|
144
|
+
|
143
145
|
output = ["\n\n"]
|
144
|
-
output << color(format("%4d) %s", index,
|
146
|
+
output << color(format("%4d) %s", index, test[:description]))
|
145
147
|
output << "\n" << color(indent(message), :red)
|
146
148
|
output << "\n" << color(backtrace, :blue)
|
147
149
|
io.print output.join
|
148
150
|
end
|
149
151
|
|
150
152
|
private def display_skipped(result, index)
|
151
|
-
location =
|
153
|
+
location = filter_backtrace(
|
154
|
+
result
|
155
|
+
.failure
|
156
|
+
.backtrace_locations
|
157
|
+
.map {|l| [l.path, l.lineno].join(":") }
|
158
|
+
).first
|
159
|
+
|
160
|
+
location, line = location.to_s.split(":")
|
161
|
+
location = Pathname(location).relative_path_from(Pathname.pwd)
|
162
|
+
location = "#{location}:#{line}"
|
163
|
+
|
164
|
+
test = find_test_info(result)
|
152
165
|
output = ["\n\n"]
|
153
166
|
output << color(
|
154
|
-
format("%4d) %s [SKIPPED]", index,
|
167
|
+
format("%4d) %s [SKIPPED]", index, test[:description]), :yellow
|
155
168
|
)
|
156
169
|
output << "\n" << indent(color(location, :yellow))
|
157
170
|
io.print output.join
|
158
171
|
end
|
159
172
|
|
160
173
|
private def display_replay_command(result)
|
161
|
-
test =
|
174
|
+
test = find_test_info(result)
|
162
175
|
return if test[:source_location].empty?
|
163
176
|
|
164
177
|
command = build_test_command(test, result)
|
@@ -169,7 +182,7 @@ module Minitest
|
|
169
182
|
io.print output.join
|
170
183
|
end
|
171
184
|
|
172
|
-
private def
|
185
|
+
private def find_test_info(result)
|
173
186
|
Test.tests.fetch("#{result.klass}##{result.name}")
|
174
187
|
end
|
175
188
|
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: minitest-utils
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nando Vieira
|
8
8
|
bindir: exe
|
9
9
|
cert_chain: []
|
10
|
-
date: 2025-03-
|
10
|
+
date: 2025-03-14 00:00:00.000000000 Z
|
11
11
|
dependencies:
|
12
12
|
- !ruby/object:Gem::Dependency
|
13
13
|
name: benchmark
|
@@ -176,7 +176,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
176
176
|
- !ruby/object:Gem::Version
|
177
177
|
version: '0'
|
178
178
|
requirements: []
|
179
|
-
rubygems_version: 3.6.
|
179
|
+
rubygems_version: 3.6.2
|
180
180
|
specification_version: 4
|
181
181
|
summary: Some utilities for your Minitest day-to-day usage.
|
182
182
|
test_files: []
|