minitest 5.25.1 → 5.25.5
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
- checksums.yaml.gz.sig +0 -0
- data/History.rdoc +34 -0
- data/README.rdoc +16 -9
- data/Rakefile +1 -1
- data/lib/minitest/expectations.rb +2 -2
- data/lib/minitest/mock.rb +22 -4
- data/lib/minitest/pride_plugin.rb +1 -1
- data/lib/minitest/spec.rb +9 -8
- data/lib/minitest/test.rb +1 -1
- data/lib/minitest.rb +3 -2
- data/test/minitest/test_minitest_mock.rb +72 -5
- data/test/minitest/test_minitest_reporter.rb +11 -11
- data/test/minitest/test_minitest_spec.rb +19 -1
- data/test/minitest/test_minitest_test.rb +18 -0
- data.tar.gz.sig +0 -0
- metadata +12 -15
- 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: e2ea23b9f86dd37b5f5f3d45fb451303827cbdf9414215d8f769da3624184325
|
4
|
+
data.tar.gz: 3d976e8b864261af92ba50d466235e4fa529f31d3560d60ec4deba8e724fc872
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1258d24412b8461fe9a94acb9b795a1cd2a25db2d16f924ce6367662478d9e0672532636b5a2ccd809f549ba8ba6ab8f0cbeb6e8a249b1b91161cc4297f31c92
|
7
|
+
data.tar.gz: 4d6a977e948f40d05e7786d07656616e9f3a4e4469a59e7b5a8e571b8f6821284989156ca4225e8e7a29cfe640bbaf544248697e14536f7c63946ffc2a34232e
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data/History.rdoc
CHANGED
@@ -1,3 +1,37 @@
|
|
1
|
+
=== 5.25.5 / 2025-03-12
|
2
|
+
|
3
|
+
* 4 bug fixes:
|
4
|
+
|
5
|
+
* Bumped minimum ruby to 2.7.
|
6
|
+
* Fixed expectation docs for must/wont_pattern_match. (jaredcwhite)
|
7
|
+
* Reorder Minitest::Test.ancestors to allow reaching Minitest::Assertions#skipped? (Edouard-chin)
|
8
|
+
* Update the ruby and rails compatibility tables. (bquorning)
|
9
|
+
|
10
|
+
=== 5.25.4 / 2024-12-03
|
11
|
+
|
12
|
+
* 1 bug fix:
|
13
|
+
|
14
|
+
* Fix for must_verify definition if only requiring minitest/mock (but why?).
|
15
|
+
|
16
|
+
=== 5.25.3 / 2024-12-03
|
17
|
+
|
18
|
+
* 5 bug fixes:
|
19
|
+
|
20
|
+
* Fixed assert_mock to fail instead of raise on unmet mock expectations.
|
21
|
+
* Fixed assert_mock to take an optional message argument.
|
22
|
+
* Fixed formatting of unmet mock expectation messages.
|
23
|
+
* Fixed missing must_verify expectation to match assert_mock.
|
24
|
+
* minitest/pride: Fixed to use true colors with *-direct terminals (bk2204)
|
25
|
+
|
26
|
+
=== 5.25.2 / 2024-11-21
|
27
|
+
|
28
|
+
* 4 bug fixes:
|
29
|
+
|
30
|
+
* Include class name in spec name. (thomasmarshall)
|
31
|
+
* Fixed 'redefining object_id' warning from ruby 3.4. (mattbrictson)
|
32
|
+
* Minitest top-level namespace no longer includes entire contents of README.rdoc. Too much!
|
33
|
+
* Refactored spec's describe to more cleanly determine the superclass and name
|
34
|
+
|
1
35
|
=== 5.25.1 / 2024-08-16
|
2
36
|
|
3
37
|
* 2 bug fixes:
|
data/README.rdoc
CHANGED
@@ -412,33 +412,40 @@ supporting versions of ruby that are long past EOL. Hopefully I'll be
|
|
412
412
|
able to support only current versions of ruby sometime in the near
|
413
413
|
future.
|
414
414
|
|
415
|
-
|
415
|
+
NOTICE: At this point, I will only locally test/dev against the
|
416
|
+
currently 3 supported (non-EOL) versions of ruby. I cannot and will
|
417
|
+
not maintain that many builds.
|
418
|
+
|
419
|
+
(As of 2025-02-03)
|
416
420
|
|
417
421
|
Current versions of rails: (https://endoflife.date/rails)
|
418
422
|
|
419
423
|
| rails | min ruby | minitest | status | EOL Date |
|
420
424
|
|-------+----------+----------+----------+------------|
|
421
|
-
|
|
422
|
-
| 7.
|
423
|
-
|
|
425
|
+
| 8.0 | >= 3.2 | >= 5.1 | Current | 2026-11-07 |
|
426
|
+
| 7.2 | >= 3.1 | >= 5.1 | Current | 2026-08-09 |
|
427
|
+
| 7.1 | >= 2.7 | >= 5.1 | Security | 2025-10-01 |
|
428
|
+
| 7.0 | >= 2.7 | >= 5.1 | Security | 2025-04-01 |
|
429
|
+
| 6.1 | >= 2.5 | >= 5.1 | EOL | 2024-10-01 |
|
424
430
|
| 6.0 | >= 2.5 | >= 5.1 | EOL | 2023-06-01 |
|
425
431
|
| 5.2 | >= 2.2.2 | ~> 5.1 | EOL | 2022-06-01 |
|
426
432
|
|
427
433
|
If you want to look at the requirements for a specific version, run:
|
428
434
|
|
429
|
-
gem spec -r --ruby rails -v
|
435
|
+
gem spec -r --ruby rails -v 8.0.0
|
430
436
|
|
431
437
|
Current versions of ruby: (https://endoflife.date/ruby)
|
432
438
|
|
433
439
|
| ruby | Status | EOL Date |
|
434
440
|
|------+---------+------------|
|
435
|
-
| 3.
|
436
|
-
| 3.
|
437
|
-
| 3.
|
441
|
+
| 3.4 | Current | 2028-03-31 |
|
442
|
+
| 3.3 | Maint | 2027-03-31 |
|
443
|
+
| 3.2 | Security| 2026-03-31 |
|
444
|
+
| 3.1 | EOL | 2025-03-31 |
|
438
445
|
| 3.0 | EOL | 2024-03-31 |
|
439
446
|
| 2.7 | EOL | 2023-03-31 |
|
440
447
|
| 2.6 | EOL | 2022-03-31 |
|
441
|
-
| 2.5 | EOL | 2021-03-31 |
|
448
|
+
| 2.5 | EOL | 2021-03-31 |
|
442
449
|
|
443
450
|
=== How to test SimpleDelegates?
|
444
451
|
|
data/Rakefile
CHANGED
@@ -125,7 +125,7 @@ module Minitest::Expectations
|
|
125
125
|
infect_an_assertion :assert_output, :must_output, :block
|
126
126
|
|
127
127
|
##
|
128
|
-
# See Minitest::Assertions#
|
128
|
+
# See Minitest::Assertions#assert_pattern
|
129
129
|
#
|
130
130
|
# _ { ... }.must_pattern_match [...]
|
131
131
|
#
|
@@ -293,7 +293,7 @@ module Minitest::Expectations
|
|
293
293
|
infect_an_assertion :refute_operator, :wont_be, :reverse
|
294
294
|
|
295
295
|
##
|
296
|
-
# See Minitest::Assertions#
|
296
|
+
# See Minitest::Assertions#refute_pattern
|
297
297
|
#
|
298
298
|
# _ { ... }.wont_pattern_match [...]
|
299
299
|
#
|
data/lib/minitest/mock.rb
CHANGED
@@ -30,6 +30,7 @@ module Minitest # :nodoc:
|
|
30
30
|
end
|
31
31
|
|
32
32
|
overridden_methods.map(&:to_sym).each do |method_id|
|
33
|
+
old_w, $-w = $-w, nil
|
33
34
|
define_method method_id do |*args, **kwargs, &b|
|
34
35
|
if @expected_calls.key? method_id then
|
35
36
|
if kwargs.empty? then # FIX: drop this after 2.7 dead
|
@@ -45,6 +46,8 @@ module Minitest # :nodoc:
|
|
45
46
|
end
|
46
47
|
end
|
47
48
|
end
|
49
|
+
ensure
|
50
|
+
$-w = old_w
|
48
51
|
end
|
49
52
|
|
50
53
|
def initialize delegator = nil # :nodoc:
|
@@ -142,8 +145,8 @@ module Minitest # :nodoc:
|
|
142
145
|
def verify
|
143
146
|
@expected_calls.each do |name, expected|
|
144
147
|
actual = @actual_calls.fetch name, nil # defaults to []
|
145
|
-
raise MockExpectationError, "
|
146
|
-
raise MockExpectationError, "
|
148
|
+
raise MockExpectationError, "Expected #{__call name, expected[0]}" unless actual
|
149
|
+
raise MockExpectationError, "Expected #{__call name, expected[actual.size]}, got [#{__call name, actual}]" if
|
147
150
|
actual.size < expected.size
|
148
151
|
end
|
149
152
|
true
|
@@ -245,13 +248,28 @@ end
|
|
245
248
|
|
246
249
|
module Minitest::Assertions
|
247
250
|
##
|
248
|
-
# Assert that the mock verifies correctly.
|
251
|
+
# Assert that the mock verifies correctly and fail if not.
|
249
252
|
|
250
|
-
def assert_mock mock
|
253
|
+
def assert_mock mock, msg = nil
|
251
254
|
assert mock.verify
|
255
|
+
rescue MockExpectationError => e
|
256
|
+
msg = message(msg) { e.message }
|
257
|
+
flunk msg
|
252
258
|
end
|
253
259
|
end
|
254
260
|
|
261
|
+
module Minitest::Expectations
|
262
|
+
##
|
263
|
+
# See Minitest::Assertions#assert_mock.
|
264
|
+
#
|
265
|
+
# _(collection).must_verify
|
266
|
+
#
|
267
|
+
# :method: must_verify
|
268
|
+
|
269
|
+
infect_an_assertion :assert_mock, :must_verify, :unary if
|
270
|
+
defined?(infect_an_assertion)
|
271
|
+
end
|
272
|
+
|
255
273
|
##
|
256
274
|
# Object extensions for Minitest::Mock.
|
257
275
|
|
@@ -10,7 +10,7 @@ module Minitest
|
|
10
10
|
def self.plugin_pride_init options # :nodoc:
|
11
11
|
return unless PrideIO.pride?
|
12
12
|
|
13
|
-
klass = ENV["TERM"] =~ /^xterm|-256color$/ ? PrideLOL : PrideIO
|
13
|
+
klass = ENV["TERM"] =~ /^xterm|-(?:256color|direct)$/ ? PrideLOL : PrideIO
|
14
14
|
io = klass.new options[:io]
|
15
15
|
|
16
16
|
self.reporter.reporters.grep(Minitest::Reporter).each do |rep|
|
data/lib/minitest/spec.rb
CHANGED
@@ -81,14 +81,15 @@ module Kernel
|
|
81
81
|
|
82
82
|
def describe desc, *additional_desc, &block # :doc:
|
83
83
|
stack = Minitest::Spec.describe_stack
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
84
|
+
is_spec_class = Class === self && kind_of?(Minitest::Spec::DSL)
|
85
|
+
name = [stack.last, desc, *additional_desc]
|
86
|
+
name.prepend self if stack.empty? && is_spec_class
|
87
|
+
sclas =
|
88
|
+
stack.last \
|
89
|
+
|| (is_spec_class && self) \
|
90
|
+
|| Minitest::Spec.spec_type(desc, *additional_desc)
|
91
|
+
|
92
|
+
cls = sclas.create name.compact.join("::"), desc
|
92
93
|
|
93
94
|
stack.push cls
|
94
95
|
cls.class_eval(&block)
|
data/lib/minitest/test.rb
CHANGED
data/lib/minitest.rb
CHANGED
@@ -6,10 +6,11 @@ require_relative "minitest/parallel"
|
|
6
6
|
require_relative "minitest/compress"
|
7
7
|
|
8
8
|
##
|
9
|
-
#
|
9
|
+
# The top-level namespace for Minitest. Also the location of the main
|
10
|
+
# runtime. See +Minitest.run+ for more information.
|
10
11
|
|
11
12
|
module Minitest
|
12
|
-
VERSION = "5.25.
|
13
|
+
VERSION = "5.25.5" # :nodoc:
|
13
14
|
|
14
15
|
@@installed_at_exit ||= false
|
15
16
|
@@after_run = []
|
@@ -26,7 +26,7 @@ class TestMinitestMock < Minitest::Test
|
|
26
26
|
def test_blow_up_if_not_called
|
27
27
|
@mock.foo
|
28
28
|
|
29
|
-
util_verify_bad "
|
29
|
+
util_verify_bad "Expected meaning_of_life() => 42"
|
30
30
|
end
|
31
31
|
|
32
32
|
def test_not_blow_up_if_everything_called
|
@@ -46,7 +46,7 @@ class TestMinitestMock < Minitest::Test
|
|
46
46
|
@mock.meaning_of_life
|
47
47
|
@mock.expect :bar, true
|
48
48
|
|
49
|
-
util_verify_bad "
|
49
|
+
util_verify_bad "Expected bar() => true"
|
50
50
|
end
|
51
51
|
|
52
52
|
def test_blow_up_on_wrong_number_of_arguments
|
@@ -184,6 +184,73 @@ class TestMinitestMock < Minitest::Test
|
|
184
184
|
assert @mock == 1, "didn't mock :=="
|
185
185
|
end
|
186
186
|
|
187
|
+
def test_assert_mock__pass
|
188
|
+
mock = Minitest::Mock.new
|
189
|
+
mock.expect :loose_expectation, true, [Integer]
|
190
|
+
mock.loose_expectation 1
|
191
|
+
|
192
|
+
result = assert_mock mock
|
193
|
+
|
194
|
+
assert_equal true, result
|
195
|
+
end
|
196
|
+
|
197
|
+
def assert_bad_mock klass, msg
|
198
|
+
mock = Minitest::Mock.new
|
199
|
+
mock.expect :foo, nil, [:bar]
|
200
|
+
mock.expect :foo, nil, [:baz]
|
201
|
+
|
202
|
+
mock.foo :bar
|
203
|
+
|
204
|
+
e = assert_raises klass do
|
205
|
+
yield mock
|
206
|
+
end
|
207
|
+
|
208
|
+
assert_equal msg, e.message
|
209
|
+
end
|
210
|
+
|
211
|
+
def test_verify__error
|
212
|
+
exp = "Expected foo(:baz) => nil, got [foo(:bar) => nil]"
|
213
|
+
assert_bad_mock MockExpectationError, exp do |mock|
|
214
|
+
mock.verify
|
215
|
+
end
|
216
|
+
end
|
217
|
+
|
218
|
+
def test_assert_mock__fail
|
219
|
+
exp = "Expected foo(:baz) => nil, got [foo(:bar) => nil]."
|
220
|
+
assert_bad_mock Minitest::Assertion, exp do |mock|
|
221
|
+
assert_mock mock
|
222
|
+
end
|
223
|
+
end
|
224
|
+
|
225
|
+
def test_assert_mock__fail_msg
|
226
|
+
exp = "BLAH.\nExpected foo(:baz) => nil, got [foo(:bar) => nil]."
|
227
|
+
assert_bad_mock Minitest::Assertion, exp do |mock|
|
228
|
+
assert_mock mock, "BLAH"
|
229
|
+
end
|
230
|
+
end
|
231
|
+
|
232
|
+
def test_assert_mock__fail_exp
|
233
|
+
exp = "Expected foo(:baz) => nil, got [foo(:bar) => nil]."
|
234
|
+
assert_bad_mock Minitest::Assertion, exp do |mock|
|
235
|
+
describe "X" do
|
236
|
+
it "y" do
|
237
|
+
_(mock).must_verify
|
238
|
+
end
|
239
|
+
end.new(:blah).send(:test_0001_y)
|
240
|
+
end
|
241
|
+
end
|
242
|
+
|
243
|
+
def test_assert_mock__fail_exp_msg
|
244
|
+
exp = "BLAH.\nExpected foo(:baz) => nil, got [foo(:bar) => nil]."
|
245
|
+
assert_bad_mock Minitest::Assertion, exp do |mock|
|
246
|
+
describe "X" do
|
247
|
+
it "y" do
|
248
|
+
_(mock).must_verify "BLAH"
|
249
|
+
end
|
250
|
+
end.new(:blah).send(:test_0001_y)
|
251
|
+
end
|
252
|
+
end
|
253
|
+
|
187
254
|
def test_verify_allows_called_args_to_be_loosely_specified
|
188
255
|
mock = Minitest::Mock.new
|
189
256
|
mock.expect :loose_expectation, true, [Integer]
|
@@ -238,7 +305,7 @@ class TestMinitestMock < Minitest::Test
|
|
238
305
|
|
239
306
|
e = assert_raises(MockExpectationError) { mock.verify }
|
240
307
|
|
241
|
-
exp = "
|
308
|
+
exp = "Expected foo(:baz) => nil, got [foo(:bar) => nil]"
|
242
309
|
|
243
310
|
assert_equal exp, e.message
|
244
311
|
end
|
@@ -252,7 +319,7 @@ class TestMinitestMock < Minitest::Test
|
|
252
319
|
|
253
320
|
e = assert_raises(MockExpectationError) { mock.verify }
|
254
321
|
|
255
|
-
exp = "
|
322
|
+
exp = "Expected foo(:bar) => nil, got [foo(:bar) => nil]"
|
256
323
|
|
257
324
|
assert_equal exp, e.message
|
258
325
|
end
|
@@ -276,7 +343,7 @@ class TestMinitestMock < Minitest::Test
|
|
276
343
|
|
277
344
|
e = assert_raises(MockExpectationError) { mock.verify }
|
278
345
|
|
279
|
-
exp = "
|
346
|
+
exp = "Expected foo(%p) => nil, got [foo(%p) => nil]" \
|
280
347
|
% [{ :kw => false }, { :kw => true }]
|
281
348
|
|
282
349
|
assert_equal exp.delete("{}"), e.message
|
@@ -2,7 +2,7 @@ require "minitest/autorun"
|
|
2
2
|
require "minitest/metametameta"
|
3
3
|
require "forwardable"
|
4
4
|
|
5
|
-
class
|
5
|
+
class FakeTest < Minitest::Test
|
6
6
|
def woot
|
7
7
|
assert true
|
8
8
|
end
|
@@ -33,7 +33,7 @@ class TestMinitestReporter < MetaMetaMetaTestCase
|
|
33
33
|
|
34
34
|
def error_test
|
35
35
|
unless defined? @et then
|
36
|
-
@et =
|
36
|
+
@et = FakeTest.new :woot
|
37
37
|
@et.failures << Minitest::UnexpectedError.new(begin
|
38
38
|
raise "no"
|
39
39
|
rescue => e
|
@@ -56,7 +56,7 @@ class TestMinitestReporter < MetaMetaMetaTestCase
|
|
56
56
|
|
57
57
|
ex.set_backtrace ary
|
58
58
|
|
59
|
-
@sse =
|
59
|
+
@sse = FakeTest.new :woot
|
60
60
|
@sse.failures << Minitest::UnexpectedError.new(ex)
|
61
61
|
@sse = Minitest::Result.from @sse
|
62
62
|
end
|
@@ -65,7 +65,7 @@ class TestMinitestReporter < MetaMetaMetaTestCase
|
|
65
65
|
|
66
66
|
def fail_test
|
67
67
|
unless defined? @ft then
|
68
|
-
@ft =
|
68
|
+
@ft = FakeTest.new :woot
|
69
69
|
@ft.failures << begin
|
70
70
|
raise Minitest::Assertion, "boo"
|
71
71
|
rescue Minitest::Assertion => e
|
@@ -77,18 +77,18 @@ class TestMinitestReporter < MetaMetaMetaTestCase
|
|
77
77
|
end
|
78
78
|
|
79
79
|
def passing_test
|
80
|
-
@pt ||= Minitest::Result.from
|
80
|
+
@pt ||= Minitest::Result.from FakeTest.new(:woot)
|
81
81
|
end
|
82
82
|
|
83
83
|
def passing_test_with_metadata
|
84
|
-
test =
|
84
|
+
test = FakeTest.new :woot
|
85
85
|
test.metadata[:meta] = :data
|
86
86
|
@pt ||= Minitest::Result.from test
|
87
87
|
end
|
88
88
|
|
89
89
|
def skip_test
|
90
90
|
unless defined? @st then
|
91
|
-
@st =
|
91
|
+
@st = FakeTest.new :woot
|
92
92
|
@st.failures << begin
|
93
93
|
raise Minitest::Skip
|
94
94
|
rescue Minitest::Assertion => e
|
@@ -294,7 +294,7 @@ class TestMinitestReporter < MetaMetaMetaTestCase
|
|
294
294
|
Finished in 0.00
|
295
295
|
|
296
296
|
1) Failure:
|
297
|
-
|
297
|
+
FakeTest#woot [FILE:LINE]:
|
298
298
|
boo
|
299
299
|
|
300
300
|
1 runs, 0 assertions, 1 failures, 0 errors, 0 skips
|
@@ -318,7 +318,7 @@ class TestMinitestReporter < MetaMetaMetaTestCase
|
|
318
318
|
Finished in 0.00
|
319
319
|
|
320
320
|
1) Error:
|
321
|
-
|
321
|
+
FakeTest#woot:
|
322
322
|
RuntimeError: no
|
323
323
|
FILE:LINE:in 'error_test'
|
324
324
|
FILE:LINE:in 'test_report_error'
|
@@ -344,7 +344,7 @@ class TestMinitestReporter < MetaMetaMetaTestCase
|
|
344
344
|
Finished in 0.00
|
345
345
|
|
346
346
|
1) Error:
|
347
|
-
|
347
|
+
FakeTest#woot:
|
348
348
|
SystemStackError: 274 -> 12
|
349
349
|
a
|
350
350
|
b
|
@@ -402,7 +402,7 @@ class TestMinitestReporter < MetaMetaMetaTestCase
|
|
402
402
|
r.report
|
403
403
|
end
|
404
404
|
|
405
|
-
exp = "
|
405
|
+
exp = "FakeTest#woot [foo.rb:123]"
|
406
406
|
|
407
407
|
assert_includes io.string, exp
|
408
408
|
end
|
@@ -212,9 +212,10 @@ describe Minitest::Spec do
|
|
212
212
|
must_raise
|
213
213
|
must_respond_to
|
214
214
|
must_throw
|
215
|
+
must_verify
|
215
216
|
path_must_exist]
|
216
217
|
|
217
|
-
bad = %w[not raise throw send output be_silent]
|
218
|
+
bad = %w[not raise throw send output be_silent verify]
|
218
219
|
|
219
220
|
expected_wonts = expected_musts.map { |m| m.sub("must", "wont") }.sort
|
220
221
|
expected_wonts.reject! { |m| m =~ /wont_#{Regexp.union(*bad)}/ }
|
@@ -952,6 +953,23 @@ class TestMeta < MetaMetaMetaTestCase
|
|
952
953
|
assert_equal "ExampleB::random_method", spec_b.name
|
953
954
|
end
|
954
955
|
|
956
|
+
def test_name_inside_class
|
957
|
+
spec_a = nil
|
958
|
+
spec_b = nil
|
959
|
+
inside_class_example = Class.new Minitest::Spec
|
960
|
+
Object.const_set :InsideClassExample, inside_class_example
|
961
|
+
inside_class_example.class_eval do
|
962
|
+
spec_a = describe "a" do
|
963
|
+
spec_b = describe "b" do; end
|
964
|
+
end
|
965
|
+
end
|
966
|
+
|
967
|
+
assert_equal "InsideClassExample::a", spec_a.name
|
968
|
+
assert_equal "InsideClassExample::a::b", spec_b.name
|
969
|
+
ensure
|
970
|
+
Object.send :remove_const, :InsideClassExample
|
971
|
+
end
|
972
|
+
|
955
973
|
def test_structure
|
956
974
|
x, y, z, * = util_structure
|
957
975
|
|
@@ -157,6 +157,24 @@ class TestMinitestUnit < MetaMetaMetaTestCase
|
|
157
157
|
refute_predicate test, :skipped?
|
158
158
|
end
|
159
159
|
|
160
|
+
def test_skipped_is_reachable
|
161
|
+
test_class = Class.new FakeNamedTest do
|
162
|
+
def test_omg
|
163
|
+
skip
|
164
|
+
ensure
|
165
|
+
flunk unless skipped?
|
166
|
+
end
|
167
|
+
end
|
168
|
+
|
169
|
+
test = test_class.new :test_omg
|
170
|
+
test.run
|
171
|
+
|
172
|
+
refute_predicate test, :error?
|
173
|
+
refute_predicate test, :passed?
|
174
|
+
|
175
|
+
assert_predicate test, :skipped?
|
176
|
+
end
|
177
|
+
|
160
178
|
def util_expand_bt bt
|
161
179
|
bt.map { |f| f.start_with?(".") ? File.expand_path(f) : f }
|
162
180
|
end
|
data.tar.gz.sig
CHANGED
Binary file
|
metadata
CHANGED
@@ -1,18 +1,17 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: minitest
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.25.
|
4
|
+
version: 5.25.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ryan Davis
|
8
|
-
autorequire:
|
9
8
|
bindir: bin
|
10
9
|
cert_chain:
|
11
10
|
- |
|
12
11
|
-----BEGIN CERTIFICATE-----
|
13
|
-
|
12
|
+
MIIDPjCCAiagAwIBAgIBCTANBgkqhkiG9w0BAQsFADBFMRMwEQYDVQQDDApyeWFu
|
14
13
|
ZC1ydWJ5MRkwFwYKCZImiZPyLGQBGRYJemVuc3BpZGVyMRMwEQYKCZImiZPyLGQB
|
15
|
-
|
14
|
+
GRYDY29tMB4XDTI1MDEwNjIzMjcwMVoXDTI2MDEwNjIzMjcwMVowRTETMBEGA1UE
|
16
15
|
AwwKcnlhbmQtcnVieTEZMBcGCgmSJomT8ixkARkWCXplbnNwaWRlcjETMBEGCgmS
|
17
16
|
JomT8ixkARkWA2NvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALda
|
18
17
|
b9DCgK+627gPJkB6XfjZ1itoOQvpqH1EXScSaba9/S2VF22VYQbXU1xQXL/WzCkx
|
@@ -22,14 +21,14 @@ cert_chain:
|
|
22
21
|
qhtV7HJxNKuPj/JFH0D2cswvzznE/a5FOYO68g+YCuFi5L8wZuuM8zzdwjrWHqSV
|
23
22
|
gBEfoTEGr7Zii72cx+sCAwEAAaM5MDcwCQYDVR0TBAIwADALBgNVHQ8EBAMCBLAw
|
24
23
|
HQYDVR0OBBYEFEfFe9md/r/tj/Wmwpy+MI8d9k/hMA0GCSqGSIb3DQEBCwUAA4IB
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
24
|
+
AQAC0WQJcPOWPFwkojhzweilRVjTJ19UiLhiBTw3C1wJO3LVdBkWDmnnhAmKuX4D
|
25
|
+
r7vjQvESlABGIPdutI1Yl7mrHQzTkfLfXvNN6MT0nLChPyIYauT6SZZxubwJrUfA
|
26
|
+
7R0c2CJTIboZ0XaGpLsXqHEF1c29H7TV1QvVuqKAN2mCjh4N82QVn+ZKtys28AwT
|
27
|
+
6GfQX2fqLoi4KSc7xIzHKaNzqxeOICmJofk9w5VZ2rRN6yes8jvFYwz9HR41wdj8
|
28
|
+
bwfinv7Yp5fA6AysuZLhCykyfDuZVRrUp0Vb68YCKsLjJly/Theak+euNTxvHsB+
|
29
|
+
al9oSgPPHICMEX65qvLywitx
|
31
30
|
-----END CERTIFICATE-----
|
32
|
-
date:
|
31
|
+
date: 2025-03-12 00:00:00.000000000 Z
|
33
32
|
dependencies:
|
34
33
|
- !ruby/object:Gem::Dependency
|
35
34
|
name: rdoc
|
@@ -167,7 +166,6 @@ metadata:
|
|
167
166
|
homepage_uri: https://github.com/minitest/minitest
|
168
167
|
bug_tracker_uri: https://github.com/minitest/minitest/issues
|
169
168
|
changelog_uri: https://github.com/minitest/minitest/blob/master/History.rdoc
|
170
|
-
post_install_message:
|
171
169
|
rdoc_options:
|
172
170
|
- "--main"
|
173
171
|
- README.rdoc
|
@@ -177,7 +175,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
177
175
|
requirements:
|
178
176
|
- - ">="
|
179
177
|
- !ruby/object:Gem::Version
|
180
|
-
version: '2.
|
178
|
+
version: '2.7'
|
181
179
|
- - "<"
|
182
180
|
- !ruby/object:Gem::Version
|
183
181
|
version: '4.0'
|
@@ -187,8 +185,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
187
185
|
- !ruby/object:Gem::Version
|
188
186
|
version: '0'
|
189
187
|
requirements: []
|
190
|
-
rubygems_version: 3.
|
191
|
-
signing_key:
|
188
|
+
rubygems_version: 3.6.3
|
192
189
|
specification_version: 4
|
193
190
|
summary: minitest provides a complete suite of testing facilities supporting TDD,
|
194
191
|
BDD, mocking, and benchmarking
|
metadata.gz.sig
CHANGED
Binary file
|