minitest 6.0.0 → 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 +31 -3
- data/Manifest.txt +1 -1
- data/README.rdoc +3 -2
- data/Rakefile +3 -0
- data/lib/minitest/benchmark.rb +1 -1
- data/lib/minitest/bisect.rb +5 -7
- data/lib/minitest/path_expander.rb +18 -4
- 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/test_task.rb +12 -3
- data/lib/minitest.rb +16 -6
- data/test/minitest/test_bisect.rb +22 -8
- data/test/minitest/test_minitest_benchmark.rb +14 -0
- data/test/minitest/test_server.rb +12 -15
- data.tar.gz.sig +0 -0
- metadata +41 -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: 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,31 @@
|
|
|
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
|
+
|
|
13
|
+
=== 6.0.1 / 2025-12-26
|
|
14
|
+
|
|
15
|
+
* 1 minor enhancement:
|
|
16
|
+
|
|
17
|
+
* Added new rake task `test:fu` to Minitest::TestTask, to only run
|
|
18
|
+
tests with FU (focused units?) in their name. This should mostly
|
|
19
|
+
obviate the need for the minitest-focus plugin.
|
|
20
|
+
|
|
21
|
+
* 5 bug fixes:
|
|
22
|
+
|
|
23
|
+
* Fixed --help and --version exiting 1. (grosser)
|
|
24
|
+
* Fixed method signature of Minitest::Benchmark.run. (flavorjones)
|
|
25
|
+
* Flush stdout/stderr before exit./bin/minitest -Ilib ./bug1046.rb:1 < /dev/null (grosser)
|
|
26
|
+
* Improved usage banner output by reordering and reformatting.
|
|
27
|
+
* Normalize paths while processing file.rb:line args.
|
|
28
|
+
|
|
1
29
|
=== 6.0.0 / 2025-12-17
|
|
2
30
|
|
|
3
31
|
This is a major release. Read this.
|
|
@@ -24,9 +52,9 @@ Oh god... here we go... (again)
|
|
|
24
52
|
* Runnable.run -> Runnable.run_suite & Runnable.filter_runnable_methods
|
|
25
53
|
* Runnable.run_one_method -> Runnable.run
|
|
26
54
|
* Removed Minitest.run_one_method (might bring it back to raise?)
|
|
27
|
-
* Removed deprecated ENV["N"] to specify number of parallel tests. Use MT_CPU.
|
|
28
|
-
* Renamed options[:filter] to options[:include]
|
|
29
|
-
*
|
|
55
|
+
* Removed deprecated <tt>ENV["N"]</tt> to specify number of parallel tests. Use MT_CPU.
|
|
56
|
+
* Renamed +options[:filter]+ to +options[:include]+, added <tt>--include</tt> cmdline option.
|
|
57
|
+
* <tt>--name</tt> is still handled, but that will be removed in the future.
|
|
30
58
|
* Renamed Minitest::Runnable#test_order to #run_order.
|
|
31
59
|
* If #message is passed a proc then that proc overrides all other output.
|
|
32
60
|
* They are no longer chained!
|
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/benchmark.rb
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:
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
require "prism"
|
|
2
|
+
require "pathname" # for ruby 3
|
|
2
3
|
|
|
3
4
|
module Minitest; end # :nodoc:
|
|
4
5
|
|
|
@@ -59,9 +60,11 @@ class Minitest::VendoredPathExpander
|
|
|
59
60
|
else
|
|
60
61
|
p
|
|
61
62
|
end
|
|
62
|
-
}.flatten.sort.map { |s| s
|
|
63
|
+
}.flatten.sort.map { |s| _normalize s }
|
|
63
64
|
end
|
|
64
65
|
|
|
66
|
+
def _normalize(f) = Pathname.new(f).cleanpath.to_s # :nodoc:
|
|
67
|
+
|
|
65
68
|
##
|
|
66
69
|
# Process a file into more arguments. Override this to add
|
|
67
70
|
# additional capabilities.
|
|
@@ -175,7 +178,14 @@ class Minitest::VendoredPathExpander
|
|
|
175
178
|
self
|
|
176
179
|
end
|
|
177
180
|
|
|
181
|
+
##
|
|
182
|
+
# Hook to run before process
|
|
183
|
+
|
|
178
184
|
def pre_process = nil
|
|
185
|
+
|
|
186
|
+
##
|
|
187
|
+
# Hook to run after process
|
|
188
|
+
|
|
179
189
|
def post_process = nil
|
|
180
190
|
|
|
181
191
|
##
|
|
@@ -251,8 +261,9 @@ class Minitest::PathExpander < Minitest::VendoredPathExpander
|
|
|
251
261
|
end
|
|
252
262
|
}
|
|
253
263
|
next unless File.exist? f
|
|
264
|
+
f = _normalize f
|
|
254
265
|
args << f # push path on lest it run whole dir
|
|
255
|
-
by_line[f] = ls
|
|
266
|
+
by_line[f] = ls # implies rejection
|
|
256
267
|
end
|
|
257
268
|
}
|
|
258
269
|
|
|
@@ -287,7 +298,7 @@ class Minitest::PathExpander < Minitest::VendoredPathExpander
|
|
|
287
298
|
|
|
288
299
|
tests = tests_by_class
|
|
289
300
|
|
|
290
|
-
exit! if handle_missing_tests? tests
|
|
301
|
+
exit! 1 if handle_missing_tests? tests
|
|
291
302
|
|
|
292
303
|
test_res = tests_to_regexp tests
|
|
293
304
|
self.args << "-n" << "/#{test_res.join "|"}/"
|
|
@@ -364,7 +375,8 @@ class Minitest::PathExpander < Minitest::VendoredPathExpander
|
|
|
364
375
|
puts "Did you mean?"
|
|
365
376
|
puts
|
|
366
377
|
l = l.begin if l.is_a? Range
|
|
367
|
-
by_path[f]
|
|
378
|
+
by_path[f] and
|
|
379
|
+
by_path[f]
|
|
368
380
|
.sort_by { |m| (m.line_s - l).abs }
|
|
369
381
|
.first(2)
|
|
370
382
|
.each do |m|
|
|
@@ -372,6 +384,8 @@ class Minitest::PathExpander < Minitest::VendoredPathExpander
|
|
|
372
384
|
end
|
|
373
385
|
puts
|
|
374
386
|
end
|
|
387
|
+
$stdout.flush
|
|
388
|
+
$stderr.flush
|
|
375
389
|
true
|
|
376
390
|
end
|
|
377
391
|
end
|
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/test_task.rb
CHANGED
|
@@ -187,11 +187,16 @@ module Minitest # :nodoc:
|
|
|
187
187
|
end
|
|
188
188
|
|
|
189
189
|
def define # :nodoc:
|
|
190
|
-
desc "Run the test suite. Use
|
|
190
|
+
desc "Run the test suite. Use I, X, and A to add flags/args."
|
|
191
191
|
task name do
|
|
192
192
|
ruby make_test_cmd, verbose: verbose
|
|
193
193
|
end
|
|
194
194
|
|
|
195
|
+
desc "Run the test suite, filtering for 'FU' in name (focused units?)."
|
|
196
|
+
task "#{name}:fu" do
|
|
197
|
+
ruby make_test_cmd(include:"/FU/"), verbose: verbose
|
|
198
|
+
end
|
|
199
|
+
|
|
195
200
|
desc "Print out the test command. Good for profiling and other tools."
|
|
196
201
|
task "#{name}:cmd" do
|
|
197
202
|
puts "ruby #{make_test_cmd}"
|
|
@@ -210,7 +215,7 @@ module Minitest # :nodoc:
|
|
|
210
215
|
|
|
211
216
|
n.threads_do tests.sort do |path|
|
|
212
217
|
t0 = Time.now
|
|
213
|
-
output = `#{Gem.ruby} #{make_test_cmd path} 2>&1`
|
|
218
|
+
output = `#{Gem.ruby} #{make_test_cmd path:path} 2>&1`
|
|
214
219
|
t1 = Time.now - t0
|
|
215
220
|
|
|
216
221
|
times[path] = t1
|
|
@@ -276,7 +281,9 @@ module Minitest # :nodoc:
|
|
|
276
281
|
##
|
|
277
282
|
# Generate the test command-line.
|
|
278
283
|
|
|
279
|
-
def make_test_cmd
|
|
284
|
+
def make_test_cmd **option
|
|
285
|
+
globs = option[:path] || test_globs
|
|
286
|
+
|
|
280
287
|
tests = []
|
|
281
288
|
tests.concat Dir[*globs].sort.shuffle # TODO: SEED -> srand first?
|
|
282
289
|
tests.map! { |f| %(require "#{f}") }
|
|
@@ -287,6 +294,8 @@ module Minitest # :nodoc:
|
|
|
287
294
|
runner.concat tests
|
|
288
295
|
runner = runner.join "; "
|
|
289
296
|
|
|
297
|
+
extra_args << "-i" << option[:include] if option[:include]
|
|
298
|
+
|
|
290
299
|
args = []
|
|
291
300
|
args << "-I#{libs.join File::PATH_SEPARATOR}" unless libs.empty?
|
|
292
301
|
args << "-w" if warning
|
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 = []
|
|
@@ -162,14 +162,19 @@ module Minitest
|
|
|
162
162
|
opts.version = Minitest::VERSION
|
|
163
163
|
|
|
164
164
|
opts.banner = [
|
|
165
|
-
"Usage:
|
|
166
|
-
"
|
|
167
|
-
"
|
|
165
|
+
"Usage: minitest [paths] [options]",
|
|
166
|
+
"ruby path/to/test.rb [options]",
|
|
167
|
+
"rake test [A=options] (see Minitest::TestTask for more options)\n\n",
|
|
168
168
|
].join "\n or: "
|
|
169
169
|
|
|
170
170
|
opts.on "-h", "--help", "Display this help." do
|
|
171
171
|
puts opts
|
|
172
|
-
exit
|
|
172
|
+
exit! true
|
|
173
|
+
end
|
|
174
|
+
|
|
175
|
+
opts.on "-V", "--version", "Display the version." do
|
|
176
|
+
puts "#{opts.program_name} #{Minitest::VERSION}"
|
|
177
|
+
exit! true
|
|
173
178
|
end
|
|
174
179
|
|
|
175
180
|
desc = "Sets random seed. Also via env, eg: SEED=42"
|
|
@@ -189,7 +194,8 @@ module Minitest
|
|
|
189
194
|
options[:show_skips] = true
|
|
190
195
|
end
|
|
191
196
|
|
|
192
|
-
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/)
|
|
193
199
|
|
|
194
200
|
opts.on "-i", "--include PATTERN", "Include /regexp/ or string for run." do |a|
|
|
195
201
|
options[:include] = a
|
|
@@ -1220,3 +1226,7 @@ module Minitest
|
|
|
1220
1226
|
end
|
|
1221
1227
|
|
|
1222
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
|
|
|
@@ -25,6 +25,20 @@ class TestMinitestBenchmark < Minitest::Test
|
|
|
25
25
|
assert_equal ["bench_blah"], c.runnable_methods
|
|
26
26
|
end
|
|
27
27
|
|
|
28
|
+
def test_cls_run
|
|
29
|
+
c = Class.new Minitest::Benchmark do
|
|
30
|
+
def bench_dummy
|
|
31
|
+
assert true
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
reporter = Minitest::StatisticsReporter.new(StringIO.new(+""))
|
|
36
|
+
|
|
37
|
+
c.run c, "bench_dummy", reporter
|
|
38
|
+
|
|
39
|
+
assert_equal 1, reporter.count
|
|
40
|
+
end
|
|
41
|
+
|
|
28
42
|
def test_cls_bench_range
|
|
29
43
|
assert_equal [1, 10, 100, 1_000, 10_000], Minitest::Benchmark.bench_range
|
|
30
44
|
end
|
|
@@ -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,26 +44,40 @@ 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
|
|
50
64
|
requirements:
|
|
51
65
|
- - ">="
|
|
52
66
|
- !ruby/object:Gem::Version
|
|
53
|
-
version: '
|
|
67
|
+
version: '6.0'
|
|
54
68
|
- - "<"
|
|
55
69
|
- !ruby/object:Gem::Version
|
|
56
|
-
version: '
|
|
70
|
+
version: '8'
|
|
57
71
|
type: :development
|
|
58
72
|
prerelease: false
|
|
59
73
|
version_requirements: !ruby/object:Gem::Requirement
|
|
60
74
|
requirements:
|
|
61
75
|
- - ">="
|
|
62
76
|
- !ruby/object:Gem::Version
|
|
63
|
-
version: '
|
|
77
|
+
version: '6.0'
|
|
64
78
|
- - "<"
|
|
65
79
|
- !ruby/object:Gem::Version
|
|
66
|
-
version: '
|
|
80
|
+
version: '8'
|
|
67
81
|
- !ruby/object:Gem::Dependency
|
|
68
82
|
name: simplecov
|
|
69
83
|
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
|