minitest 6.0.1 → 6.0.2
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 +12 -0
- data/Manifest.txt +1 -1
- data/README.rdoc +3 -2
- data/Rakefile +3 -0
- data/lib/minitest/bisect.rb +5 -7
- data/lib/minitest/path_expander.rb +7 -0
- data/lib/minitest/server.rb +5 -1
- data/lib/minitest/server_plugin.rb +4 -0
- data/lib/minitest/sprint.rb +6 -5
- data/lib/minitest.rb +7 -2
- data/test/minitest/test_bisect.rb +22 -8
- data/test/minitest/test_server.rb +12 -15
- data.tar.gz.sig +0 -0
- metadata +37 -11
- 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: a04ee24255c32c51840a0fcbcb8bf06f9032843e7c754f4c0acb6d99a95a0fff
|
|
4
|
+
data.tar.gz: 11522e8f24357e0317496ab945f26e6bbaf8809870827bbd8816f227a343bdd4
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 125017c3555d465f5a2bf997f6cd4d9efc6c9decf9a7e97d205db7bda8e7b9697e20b1f77898c97d30fa20efe8ed6a01ca229cd128bfeeadde8136661e60ad12
|
|
7
|
+
data.tar.gz: d11a937d873af9c33b03f0da272e0f4bad92b8fb88472e569a95a41a5589d6fbc16ae3143b6394be37dd510e2381f76d9b3f7c5b00a615b2cb339655603f2f70
|
checksums.yaml.gz.sig
CHANGED
|
Binary file
|
data/History.rdoc
CHANGED
|
@@ -1,3 +1,15 @@
|
|
|
1
|
+
=== 6.0.2 / 2026-02-23
|
|
2
|
+
|
|
3
|
+
* 7 bug fixes:
|
|
4
|
+
|
|
5
|
+
* Added missing drb dependency from minitest-server. (y-yagi)
|
|
6
|
+
* Cleaned up bisect's sub-commands to load files directly, not ruby+require.
|
|
7
|
+
* Fixed bisect to use same cmd ($0) to run tests as original invocation.
|
|
8
|
+
* load server_plugin if server is loaded. (y-yagi)
|
|
9
|
+
* Manipulate local args instead of ARGV in Sprint.run.
|
|
10
|
+
* Only show --bisect in usage if using minitest.
|
|
11
|
+
* Remove -Itest:lib from bisect's rb_flags since bin/minitest adds them.
|
|
12
|
+
|
|
1
13
|
=== 6.0.1 / 2025-12-26
|
|
2
14
|
|
|
3
15
|
* 1 minor enhancement:
|
data/Manifest.txt
CHANGED
data/README.rdoc
CHANGED
|
@@ -604,6 +604,9 @@ minitest-happy :: GLOBALLY ACTIVATE MINITEST PRIDE! RAWR!
|
|
|
604
604
|
minitest-have_tag :: Adds Minitest assertions to test for the existence of
|
|
605
605
|
HTML tags, including contents, within a provided string.
|
|
606
606
|
minitest-heat :: Reporting that builds a heat map of failure locations
|
|
607
|
+
minitest-holdify :: Stop maintaining large expected values in your
|
|
608
|
+
test/fixture files! Hold them automatically.
|
|
609
|
+
Update them effortlessly.
|
|
607
610
|
minitest-hooks :: Around and before_all/after_all/around_all hooks
|
|
608
611
|
minitest-hyper :: Pretty, single-page HTML reports for your Minitest runs
|
|
609
612
|
minitest-implicit-subject :: Implicit declaration of the test subject.
|
|
@@ -678,8 +681,6 @@ mongoid-minitest :: Minitest matchers for Mongoid.
|
|
|
678
681
|
mutant-minitest :: Minitest integration for mutant.
|
|
679
682
|
pry-rescue :: A pry plugin w/ minitest support. See
|
|
680
683
|
pry-rescue/minitest.rb.
|
|
681
|
-
rematch :: Declutter your test files from large hardcoded data
|
|
682
|
-
and update them automatically when your code changes.
|
|
683
684
|
rspec2minitest :: Easily translate any RSpec matchers to Minitest
|
|
684
685
|
assertions and expectations.
|
|
685
686
|
stubberry :: Multiple stubbing 'berries', sweet and useful
|
data/Rakefile
CHANGED
data/lib/minitest/bisect.rb
CHANGED
|
@@ -19,7 +19,7 @@ class Minitest::Bisect
|
|
|
19
19
|
|
|
20
20
|
def initialize args = ARGV # :nodoc:
|
|
21
21
|
super args, TEST_GLOB, "test"
|
|
22
|
-
self.rb_flags = %w[
|
|
22
|
+
self.rb_flags = %w[]
|
|
23
23
|
end
|
|
24
24
|
|
|
25
25
|
##
|
|
@@ -126,7 +126,7 @@ class Minitest::Bisect
|
|
|
126
126
|
puts "Final reproduction:"
|
|
127
127
|
puts
|
|
128
128
|
|
|
129
|
-
system cmd.sub(/--server \d+/, "")
|
|
129
|
+
system({"MINITEST_SERVER" => "1"}, cmd.sub(/--server \d+/, "", ))
|
|
130
130
|
ensure
|
|
131
131
|
Minitest::Server.stop
|
|
132
132
|
end
|
|
@@ -222,7 +222,7 @@ class Minitest::Bisect
|
|
|
222
222
|
def time_it prompt, cmd # :nodoc:
|
|
223
223
|
print prompt
|
|
224
224
|
t0 = Time.now
|
|
225
|
-
system "#{cmd} #{SHH}"
|
|
225
|
+
system({"MINITEST_SERVER" => "1"}, "#{cmd} #{SHH}")
|
|
226
226
|
puts " in %.2f sec" % (Time.now - t0)
|
|
227
227
|
end
|
|
228
228
|
|
|
@@ -234,10 +234,8 @@ class Minitest::Bisect
|
|
|
234
234
|
}.flatten.sort
|
|
235
235
|
end
|
|
236
236
|
|
|
237
|
-
def build_files_cmd culprits, rb, mt # :nodoc:
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
%(#{RUBY} #{rb.shelljoin} -e '#{tests}' -- #{mt.map(&:to_s).shelljoin})
|
|
237
|
+
def build_files_cmd culprits, rb, mt, cmd:$0 # :nodoc:
|
|
238
|
+
([cmd] + rb + culprits + mt).shelljoin
|
|
241
239
|
end
|
|
242
240
|
|
|
243
241
|
def build_methods_cmd cmd, culprits = [], bad = nil # :nodoc:
|
data/lib/minitest/server.rb
CHANGED
|
@@ -2,8 +2,10 @@ require "drb"
|
|
|
2
2
|
require "tmpdir"
|
|
3
3
|
require_relative "../minitest"
|
|
4
4
|
|
|
5
|
+
# :stopdoc:
|
|
6
|
+
|
|
5
7
|
class Minitest::Server
|
|
6
|
-
|
|
8
|
+
# extracted version = "1.0.10"
|
|
7
9
|
|
|
8
10
|
TOPDIR = Dir.pwd + "/"
|
|
9
11
|
|
|
@@ -43,3 +45,5 @@ class Minitest::Server
|
|
|
43
45
|
# do nothing
|
|
44
46
|
end
|
|
45
47
|
end
|
|
48
|
+
|
|
49
|
+
# :startdoc:
|
data/lib/minitest/sprint.rb
CHANGED
|
@@ -4,11 +4,12 @@ require "simplecov" if ENV["MT_COV"] || ARGV.delete("--simplecov")
|
|
|
4
4
|
require_relative "autorun"
|
|
5
5
|
require_relative "path_expander"
|
|
6
6
|
|
|
7
|
-
##
|
|
8
|
-
# Runs (Get it? It's fast!) your tests and makes it easier to rerun individual
|
|
9
|
-
# failures.
|
|
10
|
-
|
|
11
7
|
module Minitest
|
|
8
|
+
|
|
9
|
+
##
|
|
10
|
+
# Runs (Get it? It's fast!) your tests and makes it easier to rerun
|
|
11
|
+
# individual failures.
|
|
12
|
+
|
|
12
13
|
class Sprint
|
|
13
14
|
# extracted version = "1.5.0"
|
|
14
15
|
|
|
@@ -16,7 +17,7 @@ module Minitest
|
|
|
16
17
|
# Process and run minitest cmdline.
|
|
17
18
|
|
|
18
19
|
def self.run args = ARGV
|
|
19
|
-
if
|
|
20
|
+
if args.delete("--bisect") or args.delete("-b") then
|
|
20
21
|
require_relative "bisect"
|
|
21
22
|
|
|
22
23
|
return Minitest::Bisect.run ARGV
|
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 = "6.0.
|
|
13
|
+
VERSION = "6.0.2" # :nodoc:
|
|
14
14
|
|
|
15
15
|
@@installed_at_exit ||= false
|
|
16
16
|
@@after_run = []
|
|
@@ -194,7 +194,8 @@ module Minitest
|
|
|
194
194
|
options[:show_skips] = true
|
|
195
195
|
end
|
|
196
196
|
|
|
197
|
-
opts.on "-b", "--bisect", "Run minitest in bisect-mode to isolate flaky tests."
|
|
197
|
+
opts.on "-b", "--bisect", "Run minitest in bisect-mode to isolate flaky tests." if
|
|
198
|
+
File.basename($0).match?(/minitest/)
|
|
198
199
|
|
|
199
200
|
opts.on "-i", "--include PATTERN", "Include /regexp/ or string for run." do |a|
|
|
200
201
|
options[:include] = a
|
|
@@ -1225,3 +1226,7 @@ module Minitest
|
|
|
1225
1226
|
end
|
|
1226
1227
|
|
|
1227
1228
|
require_relative "minitest/test"
|
|
1229
|
+
if ENV["MINITEST_SERVER"] then
|
|
1230
|
+
require_relative "minitest/server_plugin"
|
|
1231
|
+
Minitest.register_plugin :server
|
|
1232
|
+
end
|
|
@@ -28,11 +28,8 @@ class TestMinitest::TestBisect < Minitest::Test
|
|
|
28
28
|
rb = %w[-Ilib:test]
|
|
29
29
|
mt = %w[--seed 42]
|
|
30
30
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
exp = "#{ruby} -Ilib:test -e '#{body}' -- --seed 42"
|
|
35
|
-
act = bisect.build_files_cmd(files, rb, mt)
|
|
31
|
+
exp = "minitest -Ilib:test a.rb b.rb c.rb --seed 42"
|
|
32
|
+
act = bisect.build_files_cmd(files, rb, mt, cmd:"minitest")
|
|
36
33
|
|
|
37
34
|
assert_equal exp, act
|
|
38
35
|
end
|
|
@@ -202,13 +199,30 @@ class TestMinitest::TestBisect < Minitest::Test
|
|
|
202
199
|
end
|
|
203
200
|
|
|
204
201
|
class TestMinitest::TestBisect::TestPathExpander < Minitest::Test
|
|
202
|
+
def setup
|
|
203
|
+
@orig_i = $LOAD_PATH.dup
|
|
204
|
+
@orig_w = $VERBOSE
|
|
205
|
+
@orig_d = $DEBUG
|
|
206
|
+
end
|
|
207
|
+
|
|
208
|
+
def teardown
|
|
209
|
+
$LOAD_PATH.replace @orig_i
|
|
210
|
+
$VERBOSE = @orig_w
|
|
211
|
+
$DEBUG = @orig_d
|
|
212
|
+
end
|
|
213
|
+
|
|
205
214
|
def test_sanity
|
|
206
|
-
args = %w[1 -Iblah 2 -d 3 -w 4 5 6]
|
|
215
|
+
args = %w[1 -Iblah 2 -d 3 -w 4 5 6 lib/hoe] # lib to not have any test files
|
|
207
216
|
|
|
208
217
|
mtbpe = Minitest::Bisect::PathExpander
|
|
209
218
|
expander = mtbpe.new args
|
|
210
219
|
|
|
211
|
-
|
|
220
|
+
files = expander.process.to_a # to_a forces process -> files
|
|
221
|
+
|
|
222
|
+
assert_empty files
|
|
223
|
+
assert_empty $LOAD_PATH - @orig_i
|
|
224
|
+
assert_equal %w[-Iblah -d -w], expander.rb_flags
|
|
225
|
+
assert_equal %w[1 2 3 4 5 6], args
|
|
212
226
|
assert_same mtbpe::TEST_GLOB, expander.glob
|
|
213
227
|
end
|
|
214
228
|
|
|
@@ -218,7 +232,7 @@ class TestMinitest::TestBisect::TestPathExpander < Minitest::Test
|
|
|
218
232
|
expander = Minitest::Bisect::PathExpander.new args
|
|
219
233
|
|
|
220
234
|
exp_files = %w[1 2 3 4 5 6]
|
|
221
|
-
exp_flags = %w[-
|
|
235
|
+
exp_flags = %w[-Iblah -d -w]
|
|
222
236
|
|
|
223
237
|
files = expander.process_flags(args)
|
|
224
238
|
|
|
@@ -1,12 +1,6 @@
|
|
|
1
1
|
require "minitest/autorun"
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
require "minitest"
|
|
6
|
-
require "minitest/test"
|
|
7
|
-
require "minitest/server"
|
|
8
|
-
require "minitest/server_plugin"
|
|
9
|
-
require "minitest/autorun"
|
|
2
|
+
require_relative "../../lib/minitest/server"
|
|
3
|
+
require_relative "../../lib/minitest/server_plugin"
|
|
10
4
|
|
|
11
5
|
class BogoTests < Minitest::Test
|
|
12
6
|
def pass_test
|
|
@@ -105,7 +99,7 @@ class ServerTest < Minitest::Test
|
|
|
105
99
|
def test_error
|
|
106
100
|
msg = <<~EOM.chomp
|
|
107
101
|
RuntimeError: error
|
|
108
|
-
#{FILE}
|
|
102
|
+
#{FILE}:##:in `error_test'
|
|
109
103
|
EOM
|
|
110
104
|
|
|
111
105
|
assert_run "error", [msg], 0
|
|
@@ -114,7 +108,7 @@ class ServerTest < Minitest::Test
|
|
|
114
108
|
def test_error_unmarshalable__ivar
|
|
115
109
|
msg = <<~EOM.chomp
|
|
116
110
|
RuntimeError: error
|
|
117
|
-
#{FILE}
|
|
111
|
+
#{FILE}:##:in `unmarshalable_ivar_test'
|
|
118
112
|
EOM
|
|
119
113
|
|
|
120
114
|
assert_run "unmarshalable_ivar", [msg], 0
|
|
@@ -123,7 +117,7 @@ class ServerTest < Minitest::Test
|
|
|
123
117
|
def test_error_unmarshalable__class
|
|
124
118
|
msg = <<~EOM.chomp
|
|
125
119
|
RuntimeError: Neutered Exception #<Class:0xXXXXXX>: error
|
|
126
|
-
#{FILE}
|
|
120
|
+
#{FILE}:##:in `unmarshalable_class_test'
|
|
127
121
|
EOM
|
|
128
122
|
|
|
129
123
|
assert_run "unmarshalable_class", [msg], 0
|
|
@@ -136,12 +130,15 @@ class ServerTest < Minitest::Test
|
|
|
136
130
|
def assert_run type, e, n
|
|
137
131
|
e[0] = e[0].sub "`", "'BogoTests#" if RUBY_VERSION > "3.4" if e[0]
|
|
138
132
|
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
act[-3].map!(&:message)
|
|
133
|
+
# client.minitest_result file, klass, method, fails, assertions, time
|
|
134
|
+
f, k, m, (msg,), a, _time = Server.run type
|
|
142
135
|
|
|
143
|
-
|
|
136
|
+
msg &&= msg
|
|
137
|
+
.message
|
|
138
|
+
.gsub(/0x\h+/, "0xXXXXXX")
|
|
139
|
+
.gsub(/:\d{2,}/, ":##")
|
|
144
140
|
|
|
141
|
+
act = [f, k, m, [msg].compact, a, 0]
|
|
145
142
|
exp = ["test/minitest/test_server.rb", "BogoTests", "#{type}_test", e, n, 0]
|
|
146
143
|
|
|
147
144
|
assert_equal exp, act
|
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: 6.0.
|
|
4
|
+
version: 6.0.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Ryan Davis
|
|
@@ -9,9 +9,9 @@ bindir: bin
|
|
|
9
9
|
cert_chain:
|
|
10
10
|
- |
|
|
11
11
|
-----BEGIN CERTIFICATE-----
|
|
12
|
-
|
|
12
|
+
MIIDPjCCAiagAwIBAgIBCjANBgkqhkiG9w0BAQsFADBFMRMwEQYDVQQDDApyeWFu
|
|
13
13
|
ZC1ydWJ5MRkwFwYKCZImiZPyLGQBGRYJemVuc3BpZGVyMRMwEQYKCZImiZPyLGQB
|
|
14
|
-
|
|
14
|
+
GRYDY29tMB4XDTI2MDEwNzAxMDkxNFoXDTI3MDEwNzAxMDkxNFowRTETMBEGA1UE
|
|
15
15
|
AwwKcnlhbmQtcnVieTEZMBcGCgmSJomT8ixkARkWCXplbnNwaWRlcjETMBEGCgmS
|
|
16
16
|
JomT8ixkARkWA2NvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALda
|
|
17
17
|
b9DCgK+627gPJkB6XfjZ1itoOQvpqH1EXScSaba9/S2VF22VYQbXU1xQXL/WzCkx
|
|
@@ -21,12 +21,12 @@ cert_chain:
|
|
|
21
21
|
qhtV7HJxNKuPj/JFH0D2cswvzznE/a5FOYO68g+YCuFi5L8wZuuM8zzdwjrWHqSV
|
|
22
22
|
gBEfoTEGr7Zii72cx+sCAwEAAaM5MDcwCQYDVR0TBAIwADALBgNVHQ8EBAMCBLAw
|
|
23
23
|
HQYDVR0OBBYEFEfFe9md/r/tj/Wmwpy+MI8d9k/hMA0GCSqGSIb3DQEBCwUAA4IB
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
24
|
+
AQA/X8/PKTTc/IkYQEUL6XWtfK8fAfbuLJzmLcz6f2ZWrtBvPsYvqRuwI1bWUtil
|
|
25
|
+
2ibJEfIuSIHX6BsUTX18+hlaIussf6EWq/YkE7e2BKmgQE42vSOZMce0kCEAPbx0
|
|
26
|
+
rQtqonfWTHQ8UbQ7GqCL3gDQ0QDD2B+HUlb4uaCZ2icxqa/eOtxMvHC2tj+h0xKY
|
|
27
|
+
xL84ipM5kr0bHGf9/MRZJWcw51urueNycBXu1Xh+pEN8qBmYsFRR4SIODLClybAO
|
|
28
|
+
6cbm2PyPQgKNiqE4H+IQrDVHd9bJs1XgLElk3qoaJBWXc/5fy0J1imYb25UqmiHG
|
|
29
|
+
snGe1hrppvBRdcyEzvhfIPjI
|
|
30
30
|
-----END CERTIFICATE-----
|
|
31
31
|
date: 1980-01-02 00:00:00.000000000 Z
|
|
32
32
|
dependencies:
|
|
@@ -44,6 +44,20 @@ dependencies:
|
|
|
44
44
|
- - "~>"
|
|
45
45
|
- !ruby/object:Gem::Version
|
|
46
46
|
version: '1.5'
|
|
47
|
+
- !ruby/object:Gem::Dependency
|
|
48
|
+
name: drb
|
|
49
|
+
requirement: !ruby/object:Gem::Requirement
|
|
50
|
+
requirements:
|
|
51
|
+
- - "~>"
|
|
52
|
+
- !ruby/object:Gem::Version
|
|
53
|
+
version: '2.0'
|
|
54
|
+
type: :runtime
|
|
55
|
+
prerelease: false
|
|
56
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
57
|
+
requirements:
|
|
58
|
+
- - "~>"
|
|
59
|
+
- !ruby/object:Gem::Version
|
|
60
|
+
version: '2.0'
|
|
47
61
|
- !ruby/object:Gem::Dependency
|
|
48
62
|
name: rdoc
|
|
49
63
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -84,14 +98,14 @@ dependencies:
|
|
|
84
98
|
requirements:
|
|
85
99
|
- - "~>"
|
|
86
100
|
- !ruby/object:Gem::Version
|
|
87
|
-
version: '4.
|
|
101
|
+
version: '4.6'
|
|
88
102
|
type: :development
|
|
89
103
|
prerelease: false
|
|
90
104
|
version_requirements: !ruby/object:Gem::Requirement
|
|
91
105
|
requirements:
|
|
92
106
|
- - "~>"
|
|
93
107
|
- !ruby/object:Gem::Version
|
|
94
|
-
version: '4.
|
|
108
|
+
version: '4.6'
|
|
95
109
|
description: |-
|
|
96
110
|
minitest provides a complete suite of testing facilities supporting
|
|
97
111
|
TDD, BDD, and benchmarking.
|
|
@@ -143,6 +157,17 @@ description: |-
|
|
|
143
157
|
classes, modules, inheritance, methods. This means you only have to
|
|
144
158
|
learn ruby to use minitest and all of your regular OO practices like
|
|
145
159
|
extract-method refactorings still apply.
|
|
160
|
+
|
|
161
|
+
== Features/Problems:
|
|
162
|
+
|
|
163
|
+
* minitest/autorun - the easy and explicit way to run all your tests.
|
|
164
|
+
* minitest/test - a very fast, simple, and clean test system.
|
|
165
|
+
* minitest/spec - a very fast, simple, and clean spec system.
|
|
166
|
+
* minitest/benchmark - an awesome way to assert your algorithm's performance.
|
|
167
|
+
* minitest/pride - show your pride in testing!
|
|
168
|
+
* minitest/test_task - a full-featured and clean rake task generator.
|
|
169
|
+
* Incredibly small and fast runner, but no bells and whistles.
|
|
170
|
+
* Written by squishy human beings. Software can never be perfect. We will all eventually die.
|
|
146
171
|
email:
|
|
147
172
|
- ryand-ruby@zenspider.com
|
|
148
173
|
executables:
|
|
@@ -201,6 +226,7 @@ metadata:
|
|
|
201
226
|
homepage_uri: https://minite.st/
|
|
202
227
|
source_code_uri: https://github.com/minitest/minitest
|
|
203
228
|
bug_tracker_uri: https://github.com/minitest/minitest/issues
|
|
229
|
+
documentation_uri: https://docs.seattlerb.org/minitest
|
|
204
230
|
changelog_uri: https://github.com/minitest/minitest/blob/master/History.rdoc
|
|
205
231
|
rdoc_options:
|
|
206
232
|
- "--main"
|
metadata.gz.sig
CHANGED
|
Binary file
|