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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 507bc02dff7669be704f151c1b52970df6a625a798ba3baadbb330440f6e4401
4
- data.tar.gz: 12b89c4586b899dc4a0f6317cc99a1754db5dedc468cdbd8d2ae06f40926d33e
3
+ metadata.gz: a04ee24255c32c51840a0fcbcb8bf06f9032843e7c754f4c0acb6d99a95a0fff
4
+ data.tar.gz: 11522e8f24357e0317496ab945f26e6bbaf8809870827bbd8816f227a343bdd4
5
5
  SHA512:
6
- metadata.gz: 4de7c54b989352c854e2b7769f9483c1b99dacb071752c419f55e82f3f714323d9294fc5820d5efa9e30baec7f5d346772b00dce72aa69d6d31a8b96cc57187c
7
- data.tar.gz: e2b28dc14bd8caef238c4dc89007a25be3c41cc1eccaec266372c546687f2e94c3f878a4217fe1a969df21b7faef83db723ffe313cb8f850ada06682fe201875
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
@@ -37,5 +37,5 @@ test/minitest/test_minitest_reporter.rb
37
37
  test/minitest/test_minitest_spec.rb
38
38
  test/minitest/test_minitest_test.rb
39
39
  test/minitest/test_minitest_test_task.rb
40
- test/minitest/test_server.rb
41
40
  test/minitest/test_path_expander.rb
41
+ test/minitest/test_server.rb
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
@@ -16,6 +16,9 @@ Hoe.spec "minitest" do
16
16
  require_ruby_version ">= 3.2"
17
17
 
18
18
  dependency "prism", "~> 1.5"
19
+ dependency "drb", "~> 2.0"
20
+
21
+ self.rdoc_locations << "l:/home/www/minite.st/html/docs"
19
22
 
20
23
  self.cov_filter = %w[ tmp ]
21
24
  end
@@ -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[-Itest:lib]
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
- tests = culprits.flatten.compact.map { |f| %(require "./#{f}") }.join " ; "
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:
@@ -178,7 +178,14 @@ class Minitest::VendoredPathExpander
178
178
  self
179
179
  end
180
180
 
181
+ ##
182
+ # Hook to run before process
183
+
181
184
  def pre_process = nil
185
+
186
+ ##
187
+ # Hook to run after process
188
+
182
189
  def post_process = nil
183
190
 
184
191
  ##
@@ -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
- VERSION = "1.0.9"
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:
@@ -1,5 +1,7 @@
1
1
  require_relative "../minitest"
2
2
 
3
+ # :stopdoc:
4
+
3
5
  module Minitest
4
6
  @server = false
5
7
 
@@ -82,3 +84,5 @@ class Minitest::ServerReporter < Minitest::AbstractReporter
82
84
  @mt_server.report
83
85
  end
84
86
  end
87
+
88
+ # :startdoc:
@@ -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 ARGV.delete("--bisect") or ARGV.delete("-b") then
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.1" # :nodoc:
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
- ruby = Minitest::Bisect::RUBY
32
- body = "require \"./a.rb\" ; require \"./b.rb\" ; require \"./c.rb\""
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
- assert_equal %w[-Itest:lib], expander.rb_flags
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[-Itest:lib -Iblah -d -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
- require "minitest/server"
3
- require "minitest/server_plugin"
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}:21:in `error_test'
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}:25:in `unmarshalable_ivar_test'
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}:33:in `unmarshalable_class_test'
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
- act = Server.run type
140
- act[-1] = 0 # time
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
- act[-3][0] = act[-3][0].gsub(/0x\h+/, "0xXXXXXX") if act[-3][0]
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.1
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
- MIIDPjCCAiagAwIBAgIBCTANBgkqhkiG9w0BAQsFADBFMRMwEQYDVQQDDApyeWFu
12
+ MIIDPjCCAiagAwIBAgIBCjANBgkqhkiG9w0BAQsFADBFMRMwEQYDVQQDDApyeWFu
13
13
  ZC1ydWJ5MRkwFwYKCZImiZPyLGQBGRYJemVuc3BpZGVyMRMwEQYKCZImiZPyLGQB
14
- GRYDY29tMB4XDTI1MDEwNjIzMjcwMVoXDTI2MDEwNjIzMjcwMVowRTETMBEGA1UE
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
- AQAC0WQJcPOWPFwkojhzweilRVjTJ19UiLhiBTw3C1wJO3LVdBkWDmnnhAmKuX4D
25
- r7vjQvESlABGIPdutI1Yl7mrHQzTkfLfXvNN6MT0nLChPyIYauT6SZZxubwJrUfA
26
- 7R0c2CJTIboZ0XaGpLsXqHEF1c29H7TV1QvVuqKAN2mCjh4N82QVn+ZKtys28AwT
27
- 6GfQX2fqLoi4KSc7xIzHKaNzqxeOICmJofk9w5VZ2rRN6yes8jvFYwz9HR41wdj8
28
- bwfinv7Yp5fA6AysuZLhCykyfDuZVRrUp0Vb68YCKsLjJly/Theak+euNTxvHsB+
29
- al9oSgPPHICMEX65qvLywitx
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.5'
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.5'
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