minitest 5.21.2 → 5.22.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data/History.rdoc +11 -0
- data/lib/minitest.rb +33 -20
- data.tar.gz.sig +0 -0
- metadata +2 -2
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 36a02c1522b429152689b46166cd66d5325797d0f4efb35c96458932a7917ba8
|
4
|
+
data.tar.gz: 699070f4a0c1e0acd2e277c602638373b1d470768a668793e6890aae6e7e49b3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e95a14b71c9cd2e27a26c6593d59075357ecc177b8b618e82dd0c5e03ba13f0322f1f0b36c429022450ae98a0fe6039e210dd7a774c0af93ca970d641e6acb16
|
7
|
+
data.tar.gz: 7b1bf55227d08443c8270e04d093981fda13aa37f9fd855a3fb74e77ad0c9b8e9c8d391f519f5173151614b3c074e86639a0a9503ff89afd6fad8ddbd44b800f
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data/History.rdoc
CHANGED
@@ -1,3 +1,14 @@
|
|
1
|
+
=== 5.22.0 / 2024-02-05
|
2
|
+
|
3
|
+
* 1 minor enhancement:
|
4
|
+
|
5
|
+
* Added "did you mean" output if your --name filter matches nothing. (tenderlove)
|
6
|
+
|
7
|
+
* 2 bug fixes:
|
8
|
+
|
9
|
+
* Big cleanup of test filtering. Much prettier / more functional.
|
10
|
+
* Fix situation where Assertion#location can't find the location. (pftg)
|
11
|
+
|
1
12
|
=== 5.21.2 / 2024-01-17
|
2
13
|
|
3
14
|
* 1 bug fix:
|
data/lib/minitest.rb
CHANGED
@@ -9,7 +9,7 @@ require_relative "minitest/compress"
|
|
9
9
|
# :include: README.rdoc
|
10
10
|
|
11
11
|
module Minitest
|
12
|
-
VERSION = "5.
|
12
|
+
VERSION = "5.22.0" # :nodoc:
|
13
13
|
|
14
14
|
@@installed_at_exit ||= false
|
15
15
|
@@after_run = []
|
@@ -134,7 +134,7 @@ module Minitest
|
|
134
134
|
# Minitest.run(args)
|
135
135
|
# Minitest.__run(reporter, options)
|
136
136
|
# Runnable.runnables.each
|
137
|
-
#
|
137
|
+
# runnable_klass.run(reporter, options)
|
138
138
|
# self.runnable_methods.each
|
139
139
|
# self.run_one_method(self, runnable_method, reporter)
|
140
140
|
# Minitest.run_one_method(klass, runnable_method)
|
@@ -164,11 +164,33 @@ module Minitest
|
|
164
164
|
warn "Interrupted. Exiting..."
|
165
165
|
end
|
166
166
|
self.parallel_executor.shutdown
|
167
|
+
|
168
|
+
# might have been removed/replaced during init_plugins:
|
169
|
+
summary = reporter.reporters.grep(SummaryReporter).first
|
170
|
+
return empty_run! options if summary && summary.count == 0
|
171
|
+
|
167
172
|
reporter.report
|
168
173
|
|
169
174
|
reporter.passed?
|
170
175
|
end
|
171
176
|
|
177
|
+
def self.empty_run! options # :nodoc:
|
178
|
+
filter = options[:filter]
|
179
|
+
|
180
|
+
warn "Nothing ran for filter: %s" % [filter]
|
181
|
+
|
182
|
+
require "did_you_mean" # soft dependency, punt if it doesn't load
|
183
|
+
|
184
|
+
ms = Runnable.runnables.flat_map(&:runnable_methods)
|
185
|
+
cs = DidYouMean::SpellChecker.new(dictionary: ms).correct filter
|
186
|
+
|
187
|
+
warn DidYouMean::Formatter.message_for cs unless cs.empty?
|
188
|
+
rescue LoadError
|
189
|
+
# do nothing
|
190
|
+
ensure
|
191
|
+
false
|
192
|
+
end
|
193
|
+
|
172
194
|
##
|
173
195
|
# Internal run method. Responsible for telling all Runnable
|
174
196
|
# sub-classes to run.
|
@@ -338,25 +360,15 @@ module Minitest
|
|
338
360
|
# reporter to record.
|
339
361
|
|
340
362
|
def self.run reporter, options = {}
|
341
|
-
|
342
|
-
|
343
|
-
filter = Regexp.new $1 if filter.is_a?(String) && filter =~ %r%/(.*)/%
|
344
|
-
|
345
|
-
self.runnable_methods.find_all { |m|
|
346
|
-
filter === m || filter === "#{self}##{m}"
|
347
|
-
}
|
348
|
-
else
|
349
|
-
self.runnable_methods
|
350
|
-
end
|
363
|
+
pos = options[:filter]
|
364
|
+
neg = options[:exclude]
|
351
365
|
|
352
|
-
if
|
353
|
-
|
354
|
-
exclude = Regexp.new $1 if exclude =~ %r%/(.*)/%
|
366
|
+
pos = Regexp.new $1 if pos.is_a?(String) && pos =~ %r%/(.*)/%
|
367
|
+
neg = Regexp.new $1 if neg.is_a?(String) && neg =~ %r%/(.*)/%
|
355
368
|
|
356
|
-
|
357
|
-
|
358
|
-
}
|
359
|
-
end
|
369
|
+
filtered_methods = self.runnable_methods
|
370
|
+
.select { |m| !pos || pos === m || pos === "#{self}##{m}" }
|
371
|
+
.reject { |m| neg && (neg === m || neg === "#{self}##{m}") }
|
360
372
|
|
361
373
|
return if filtered_methods.empty?
|
362
374
|
|
@@ -961,8 +973,9 @@ module Minitest
|
|
961
973
|
def location
|
962
974
|
bt = Minitest.filter_backtrace self.backtrace
|
963
975
|
idx = bt.rindex { |s| s.match? RE } || -1 # fall back to first item
|
976
|
+
loc = bt[idx+1] || bt.last || "unknown:-1"
|
964
977
|
|
965
|
-
|
978
|
+
loc.sub(/:in .*$/, "")
|
966
979
|
end
|
967
980
|
|
968
981
|
def result_code # :nodoc:
|
data.tar.gz.sig
CHANGED
Binary file
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: minitest
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.
|
4
|
+
version: 5.22.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ryan Davis
|
@@ -29,7 +29,7 @@ cert_chain:
|
|
29
29
|
S7043fq9EbQdBr2AXdj92+CDwuTfHI6/Hj5FVBDULufrJaan4xUgL70Hvc6pTTeW
|
30
30
|
deKfBjgVAq7EYHu1AczzlUly
|
31
31
|
-----END CERTIFICATE-----
|
32
|
-
date: 2024-
|
32
|
+
date: 2024-02-05 00:00:00.000000000 Z
|
33
33
|
dependencies:
|
34
34
|
- !ruby/object:Gem::Dependency
|
35
35
|
name: rdoc
|
metadata.gz.sig
CHANGED
Binary file
|