minitest 5.26.0 → 5.26.1
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 +11 -0
- data/README.rdoc +7 -2
- data/Rakefile +1 -1
- data/design_rationale.rb +21 -19
- data/lib/minitest/parallel.rb +2 -0
- data/lib/minitest.rb +9 -8
- data/test/minitest/test_minitest_spec.rb +1 -1
- data.tar.gz.sig +0 -0
- metadata +1 -4
- 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: 99c81ecf40f2e6edde9201cded0808484223cdf20d3e819e1b043e50bcc2564c
|
|
4
|
+
data.tar.gz: 543e61e5ac5da94ddbaaa51969b0b5dbf2ea91b400c13fd88830396a22627867
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 1e73adb8391043dc989b7dd2c307f5e5af72f2f2e51ef1e0fda7654cff90755fd920e2003f86ef0fa62bae2fbc9e9ec9a7a6bea76abc6a46c5b7f0500fa5b337
|
|
7
|
+
data.tar.gz: 3a860d654d72db62a86397b6849fa5509e21e5f5a021e920b0bca46d147cd8f5d7d5203ad28eb73b22b2a643683db0e8fa8948437688ec18642ef21666e3095f
|
checksums.yaml.gz.sig
CHANGED
|
Binary file
|
data/History.rdoc
CHANGED
|
@@ -1,3 +1,14 @@
|
|
|
1
|
+
=== 5.26.1 / 2025-11-08
|
|
2
|
+
|
|
3
|
+
The Ocean Shores, Slightly Less Tipsy Edition!
|
|
4
|
+
|
|
5
|
+
* 3 bug fixes:
|
|
6
|
+
|
|
7
|
+
* Add links to API doco in README.
|
|
8
|
+
* Add missing require thread.
|
|
9
|
+
* Bumped ruby version to include 4.0 (trunk). (hsbt)
|
|
10
|
+
(see also 5.14.2)
|
|
11
|
+
|
|
1
12
|
=== 5.26.0 / 2025-10-07
|
|
2
13
|
|
|
3
14
|
The Seattle.rb Nerd Party, Slightly Tipsy Edition!
|
data/README.rdoc
CHANGED
|
@@ -95,7 +95,9 @@ Given that you'd like to test the following class:
|
|
|
95
95
|
|
|
96
96
|
=== Unit tests
|
|
97
97
|
|
|
98
|
-
Define your tests as methods beginning with +test_+.
|
|
98
|
+
Define your tests as methods beginning with +test_+. Use
|
|
99
|
+
{assertions}[/minitest/Minitest/Assertions.html] to test for results
|
|
100
|
+
or state.
|
|
99
101
|
|
|
100
102
|
require "minitest/autorun"
|
|
101
103
|
|
|
@@ -119,6 +121,9 @@ Define your tests as methods beginning with +test_+.
|
|
|
119
121
|
|
|
120
122
|
=== Specs
|
|
121
123
|
|
|
124
|
+
Use {expectations}[/minitest/Minitest/Expectations.html] to check
|
|
125
|
+
results or state. They must be wrapped in a value call (eg +_+).
|
|
126
|
+
|
|
122
127
|
require "minitest/autorun"
|
|
123
128
|
|
|
124
129
|
describe Meme do
|
|
@@ -146,7 +151,7 @@ For matchers support check out:
|
|
|
146
151
|
|
|
147
152
|
=== Benchmarks
|
|
148
153
|
|
|
149
|
-
Add benchmarks to your tests.
|
|
154
|
+
Add {benchmarks}[/minitest/Minitest/Benchmark.html] to your tests.
|
|
150
155
|
|
|
151
156
|
# optionally run benchmarks, good for CI-only work!
|
|
152
157
|
require "minitest/benchmark" if ENV["BENCH"]
|
data/Rakefile
CHANGED
data/design_rationale.rb
CHANGED
|
@@ -2,25 +2,27 @@
|
|
|
2
2
|
###############################################################################
|
|
3
3
|
describe Thingy do # class TestThingy < Minitest::Test
|
|
4
4
|
before do # def setup
|
|
5
|
-
do_some_setup # super
|
|
6
|
-
end # do_some_setup
|
|
7
|
-
# end
|
|
8
|
-
it "should do the first thing" do #
|
|
9
|
-
1.must_equal 1 # def test_first_thing
|
|
10
|
-
end # assert_equal 1, 1
|
|
11
|
-
# end
|
|
12
|
-
describe SubThingy do # end
|
|
13
|
-
before do #
|
|
14
|
-
do_more_setup # class TestSubThingy < TestThingy
|
|
15
|
-
end # def setup
|
|
16
5
|
# super
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
6
|
+
do_some_setup # do_some_setup
|
|
7
|
+
end # end
|
|
8
|
+
#
|
|
9
|
+
it "should do the first thing" do # def test_first_thing
|
|
10
|
+
_(1).must_equal 1 # assert_equal 1, 1
|
|
11
|
+
end # end
|
|
23
12
|
# end
|
|
13
|
+
#
|
|
14
|
+
describe SubThingy do # class TestSubThingy < TestThingy
|
|
15
|
+
before do # def setup
|
|
16
|
+
# super
|
|
17
|
+
do_more_setup # do_more_setup
|
|
18
|
+
end # end
|
|
19
|
+
#
|
|
20
|
+
it "should do the second thing" do # def test_second_thing
|
|
21
|
+
_(2).must_equal 2 # assert_equal 2, 2
|
|
22
|
+
end # end
|
|
23
|
+
end # end
|
|
24
|
+
end #
|
|
25
|
+
#
|
|
24
26
|
###############################################################################
|
|
25
27
|
# runs 2 specs # runs 3 tests
|
|
26
28
|
###############################################################################
|
|
@@ -33,7 +35,7 @@ class ThingySpec < Minitest::Spec
|
|
|
33
35
|
end
|
|
34
36
|
|
|
35
37
|
def test_should_do_the_first_thing
|
|
36
|
-
|
|
38
|
+
_(1).must_equal 1
|
|
37
39
|
end
|
|
38
40
|
end
|
|
39
41
|
|
|
@@ -47,6 +49,6 @@ class SubThingySpec < ThingySpec
|
|
|
47
49
|
remove_method :test_should_do_the_first_thing
|
|
48
50
|
|
|
49
51
|
def test_should_do_the_second_thing
|
|
50
|
-
|
|
52
|
+
_(2).must_equal 2
|
|
51
53
|
end
|
|
52
54
|
end
|
data/lib/minitest/parallel.rb
CHANGED
data/lib/minitest.rb
CHANGED
|
@@ -10,7 +10,7 @@ require_relative "minitest/compress"
|
|
|
10
10
|
# runtime. See +Minitest.run+ for more information.
|
|
11
11
|
|
|
12
12
|
module Minitest
|
|
13
|
-
VERSION = "5.26.
|
|
13
|
+
VERSION = "5.26.1" # :nodoc:
|
|
14
14
|
|
|
15
15
|
@@installed_at_exit ||= false
|
|
16
16
|
@@after_run = []
|
|
@@ -411,6 +411,7 @@ module Minitest
|
|
|
411
411
|
pos = Regexp.new $1 if pos.kind_of?(String) && pos =~ %r%/(.*)/%
|
|
412
412
|
neg = Regexp.new $1 if neg.kind_of?(String) && neg =~ %r%/(.*)/%
|
|
413
413
|
|
|
414
|
+
# at most 1-2% slower than a 1-pass version, stop optimizing this
|
|
414
415
|
filtered_methods = self.runnable_methods
|
|
415
416
|
.select { |m| !pos || pos === m || pos === "#{self}##{m}" }
|
|
416
417
|
.reject { |m| neg && (neg === m || neg === "#{self}##{m}") }
|
|
@@ -574,7 +575,7 @@ module Minitest
|
|
|
574
575
|
def skipped?
|
|
575
576
|
raise NotImplementedError, "subclass responsibility"
|
|
576
577
|
end
|
|
577
|
-
end
|
|
578
|
+
end # Runnable
|
|
578
579
|
|
|
579
580
|
##
|
|
580
581
|
# Shared code for anything that can get passed to a Reporter. See
|
|
@@ -626,7 +627,7 @@ module Minitest
|
|
|
626
627
|
def error?
|
|
627
628
|
self.failures.any? UnexpectedError
|
|
628
629
|
end
|
|
629
|
-
end
|
|
630
|
+
end # Reportable
|
|
630
631
|
|
|
631
632
|
##
|
|
632
633
|
# This represents a test result in a clean way that can be
|
|
@@ -680,7 +681,7 @@ module Minitest
|
|
|
680
681
|
"#{failure.result_label}:\n#{self.location}:\n#{failure.message}\n"
|
|
681
682
|
}.join "\n"
|
|
682
683
|
end
|
|
683
|
-
end
|
|
684
|
+
end # Result
|
|
684
685
|
|
|
685
686
|
##
|
|
686
687
|
# Defines the API for Reporters. Subclass this and override whatever
|
|
@@ -730,7 +731,7 @@ module Minitest
|
|
|
730
731
|
def synchronize &block # :nodoc:
|
|
731
732
|
@mutex.synchronize(&block)
|
|
732
733
|
end
|
|
733
|
-
end
|
|
734
|
+
end # AbstractReportera
|
|
734
735
|
|
|
735
736
|
class Reporter < AbstractReporter # :nodoc:
|
|
736
737
|
##
|
|
@@ -885,7 +886,7 @@ module Minitest
|
|
|
885
886
|
self.warnings = aggregate[UnexpectedWarning].size
|
|
886
887
|
self.skips = aggregate[Skip].size
|
|
887
888
|
end
|
|
888
|
-
end
|
|
889
|
+
end # StatisticsReporter
|
|
889
890
|
|
|
890
891
|
##
|
|
891
892
|
# A reporter that prints the header, summary, and failure details at
|
|
@@ -963,7 +964,7 @@ module Minitest
|
|
|
963
964
|
"%d runs, %d assertions, %d failures, %d errors, %d skips%s" %
|
|
964
965
|
[count, assertions, failures, errors, skips, extra.join]
|
|
965
966
|
end
|
|
966
|
-
end
|
|
967
|
+
end # SummaryReporter
|
|
967
968
|
|
|
968
969
|
##
|
|
969
970
|
# Dispatch to multiple reporters as one.
|
|
@@ -1014,7 +1015,7 @@ module Minitest
|
|
|
1014
1015
|
def report # :nodoc:
|
|
1015
1016
|
self.reporters.each(&:report)
|
|
1016
1017
|
end
|
|
1017
|
-
end
|
|
1018
|
+
end # CompositeReporter
|
|
1018
1019
|
|
|
1019
1020
|
##
|
|
1020
1021
|
# Represents run failures.
|
|
@@ -108,7 +108,7 @@ describe Minitest::Spec do
|
|
|
108
108
|
end
|
|
109
109
|
|
|
110
110
|
it "needs to catch an expected exception" do
|
|
111
|
-
@assertion_count
|
|
111
|
+
@assertion_count -= 2
|
|
112
112
|
|
|
113
113
|
expect { raise "blah" }.must_raise RuntimeError
|
|
114
114
|
expect { raise Minitest::Assertion }.must_raise Minitest::Assertion
|
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.26.
|
|
4
|
+
version: 5.26.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Ryan Davis
|
|
@@ -176,9 +176,6 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
176
176
|
- - ">="
|
|
177
177
|
- !ruby/object:Gem::Version
|
|
178
178
|
version: '2.7'
|
|
179
|
-
- - "<"
|
|
180
|
-
- !ruby/object:Gem::Version
|
|
181
|
-
version: '4.0'
|
|
182
179
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
183
180
|
requirements:
|
|
184
181
|
- - ">="
|
metadata.gz.sig
CHANGED
|
Binary file
|