minitest 6.0.1 → 6.0.6
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 +38 -0
- data/Manifest.txt +1 -1
- data/README.rdoc +3 -2
- data/Rakefile +3 -0
- data/lib/minitest/assertions.rb +13 -10
- 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 +5 -1
- 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_minitest_assertions.rb +66 -0
- data/test/minitest/test_server.rb +12 -15
- data.tar.gz.sig +1 -4
- 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: 5bd5f764a0e5823b6af414ce7869ad229d5f417e901796475965dc869f81b0c3
|
|
4
|
+
data.tar.gz: b82a599afbc0ea6d9e4fe022fdf2fb20f81d875d012c57dd0db9cc7bf2a15acc
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: da7ef69a9a580f646ec8071574af269cc3c6a31055d2fbb5eecd6b4ba332338c91ad09469f85982b6882354e67fe82845636671bc8fd2cabe85db97497391d18
|
|
7
|
+
data.tar.gz: 05bad64ac6aa587be47737759231213c1ae86f2d7b78837392a6efddc3e7559b7f293a9d38056ed8dbcff868d601c2c6c2fea673a185da30d50d2c5193e164f7
|
checksums.yaml.gz.sig
CHANGED
|
Binary file
|
data/History.rdoc
CHANGED
|
@@ -1,3 +1,41 @@
|
|
|
1
|
+
=== 6.0.6 / 2026-04-30
|
|
2
|
+
|
|
3
|
+
* 2 bug fixes:
|
|
4
|
+
|
|
5
|
+
* Fix using assert_equal/same/nil w/ BasicObject by comparing w/ `nil == exp`. (mtasaka)
|
|
6
|
+
* Removed private Assertions#_where as it is no longer used.
|
|
7
|
+
|
|
8
|
+
=== 6.0.5 / 2026-04-20
|
|
9
|
+
|
|
10
|
+
* 2 bug fixes:
|
|
11
|
+
|
|
12
|
+
* Avoid circular requires in lib/minitest/server_plugin.rb.
|
|
13
|
+
* Raise TypeError if assert_raises is passed anything but modules/classes.
|
|
14
|
+
|
|
15
|
+
=== 6.0.4 / 2026-04-14
|
|
16
|
+
|
|
17
|
+
* 1 bug fix:
|
|
18
|
+
|
|
19
|
+
* Fixed refute_predicate to call assert_respond_to w/ include_all:true like assert_predicate does. (jparker)
|
|
20
|
+
|
|
21
|
+
=== 6.0.3 / 2026-03-31
|
|
22
|
+
|
|
23
|
+
* 1 bug fix:
|
|
24
|
+
|
|
25
|
+
* assert_same(nil, value) no longer allowed. Use assert_nil to be explicit. (paddor)
|
|
26
|
+
|
|
27
|
+
=== 6.0.2 / 2026-02-23
|
|
28
|
+
|
|
29
|
+
* 7 bug fixes:
|
|
30
|
+
|
|
31
|
+
* Added missing drb dependency from minitest-server. (y-yagi)
|
|
32
|
+
* Cleaned up bisect's sub-commands to load files directly, not ruby+require.
|
|
33
|
+
* Fixed bisect to use same cmd ($0) to run tests as original invocation.
|
|
34
|
+
* load server_plugin if server is loaded. (y-yagi)
|
|
35
|
+
* Manipulate local args instead of ARGV in Sprint.run.
|
|
36
|
+
* Only show --bisect in usage if using minitest.
|
|
37
|
+
* Remove -Itest:lib from bisect's rb_flags since bin/minitest adds them.
|
|
38
|
+
|
|
1
39
|
=== 6.0.1 / 2025-12-26
|
|
2
40
|
|
|
3
41
|
* 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/assertions.rb
CHANGED
|
@@ -190,11 +190,6 @@ module Minitest
|
|
|
190
190
|
assert_predicate obj, :empty?, msg
|
|
191
191
|
end
|
|
192
192
|
|
|
193
|
-
def _where # :nodoc:
|
|
194
|
-
Minitest.filter_backtrace(caller).first
|
|
195
|
-
.split(":in ", 2).first # clean up noise
|
|
196
|
-
end
|
|
197
|
-
|
|
198
193
|
##
|
|
199
194
|
# Fails unless <tt>exp == act</tt> printing the difference between
|
|
200
195
|
# the two, if possible.
|
|
@@ -211,7 +206,7 @@ module Minitest
|
|
|
211
206
|
def assert_equal exp, act, msg = nil
|
|
212
207
|
msg = message(msg, nil) { diff exp, act }
|
|
213
208
|
|
|
214
|
-
refute_nil exp, message { "Use assert_nil if expecting nil" } if
|
|
209
|
+
refute_nil exp, message { "Use assert_nil if expecting nil" } if nil == exp # don't count
|
|
215
210
|
|
|
216
211
|
assert exp == act, msg
|
|
217
212
|
end
|
|
@@ -287,7 +282,7 @@ module Minitest
|
|
|
287
282
|
|
|
288
283
|
def assert_nil obj, msg = nil
|
|
289
284
|
msg = message(msg) { "Expected #{mu_pp obj} to be nil" }
|
|
290
|
-
assert
|
|
285
|
+
assert nil == obj, msg
|
|
291
286
|
end
|
|
292
287
|
|
|
293
288
|
##
|
|
@@ -381,6 +376,8 @@ module Minitest
|
|
|
381
376
|
assert o1.__send__(op), msg
|
|
382
377
|
end
|
|
383
378
|
|
|
379
|
+
NO_RE_MSG = "class or module required for rescue clause. Got %p"
|
|
380
|
+
|
|
384
381
|
##
|
|
385
382
|
# Fails unless the block raises one of +exp+. Returns the
|
|
386
383
|
# exception matched so you can check the message, attributes, etc.
|
|
@@ -410,6 +407,9 @@ module Minitest
|
|
|
410
407
|
msg = "#{exp.pop}.\n" if String === exp.last
|
|
411
408
|
exp << StandardError if exp.empty?
|
|
412
409
|
|
|
410
|
+
# TODO: remove this if https://bugs.ruby-lang.org/issues/22007 gets fixed
|
|
411
|
+
raise TypeError, NO_RE_MSG % [exp] unless exp.all? Module
|
|
412
|
+
|
|
413
413
|
begin
|
|
414
414
|
yield
|
|
415
415
|
rescue *exp => e
|
|
@@ -448,6 +448,9 @@ module Minitest
|
|
|
448
448
|
data = [mu_pp(act), act.object_id, mu_pp(exp), exp.object_id]
|
|
449
449
|
"Expected %s (oid=%d) to be the same as %s (oid=%d)" % data
|
|
450
450
|
}
|
|
451
|
+
|
|
452
|
+
refute_nil exp, message { "Use assert_nil if expecting nil" } if nil == exp # don't count
|
|
453
|
+
|
|
451
454
|
assert exp.equal?(act), msg
|
|
452
455
|
end
|
|
453
456
|
|
|
@@ -603,7 +606,7 @@ module Minitest
|
|
|
603
606
|
def message msg = nil, ending = ".", &default
|
|
604
607
|
return msg if Proc === msg
|
|
605
608
|
proc {
|
|
606
|
-
custom_message = "#{msg}.\n" unless
|
|
609
|
+
custom_message = "#{msg}.\n" unless nil == msg or msg.to_s.empty?
|
|
607
610
|
"#{custom_message}#{default.call}#{ending}"
|
|
608
611
|
}
|
|
609
612
|
end
|
|
@@ -704,7 +707,7 @@ module Minitest
|
|
|
704
707
|
|
|
705
708
|
def refute_nil obj, msg = nil
|
|
706
709
|
msg = message(msg) { "Expected #{mu_pp obj} to not be nil" }
|
|
707
|
-
refute
|
|
710
|
+
refute nil == obj, msg
|
|
708
711
|
end
|
|
709
712
|
|
|
710
713
|
##
|
|
@@ -759,7 +762,7 @@ module Minitest
|
|
|
759
762
|
# str.wont_be :empty?
|
|
760
763
|
|
|
761
764
|
def refute_predicate o1, op, msg = nil
|
|
762
|
-
assert_respond_to o1, op
|
|
765
|
+
assert_respond_to o1, op, include_all:true
|
|
763
766
|
msg = message(msg) { "Expected #{mu_pp o1} to not be #{op}" }
|
|
764
767
|
refute o1.__send__(op), msg
|
|
765
768
|
end
|
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:
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
require_relative "../minitest"
|
|
1
|
+
require_relative "../minitest" unless defined? Minitest
|
|
2
|
+
|
|
3
|
+
# :stopdoc:
|
|
2
4
|
|
|
3
5
|
module Minitest
|
|
4
6
|
@server = false
|
|
@@ -82,3 +84,5 @@ class Minitest::ServerReporter < Minitest::AbstractReporter
|
|
|
82
84
|
@mt_server.report
|
|
83
85
|
end
|
|
84
86
|
end
|
|
87
|
+
|
|
88
|
+
# :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.6" # :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
|
|
|
@@ -810,6 +810,66 @@ class TestMinitestAssertions < Minitest::Test
|
|
|
810
810
|
end
|
|
811
811
|
end
|
|
812
812
|
|
|
813
|
+
def test_assert_raises__string_msg
|
|
814
|
+
e = assert_raises Minitest::Assertion do
|
|
815
|
+
@tc.assert_raises RuntimeError, "assertion message" do
|
|
816
|
+
raise SomeError, "blah"
|
|
817
|
+
end
|
|
818
|
+
end
|
|
819
|
+
|
|
820
|
+
expected = <<~EOM.chomp
|
|
821
|
+
assertion message.
|
|
822
|
+
[RuntimeError] exception expected, not
|
|
823
|
+
Class: <SomeError>
|
|
824
|
+
Message: <"blah">
|
|
825
|
+
---Backtrace---
|
|
826
|
+
FILE:LINE:in 'block in test_assert_raises__string_msg'
|
|
827
|
+
---------------
|
|
828
|
+
EOM
|
|
829
|
+
|
|
830
|
+
actual = e.message.gsub(/^.+:\d+/, "FILE:LINE")
|
|
831
|
+
actual.gsub! RE_LEVELS, "" unless jruby?
|
|
832
|
+
actual.gsub!(/[`']block in (?:TestMinitestAssertions#)?/, "'block in ")
|
|
833
|
+
|
|
834
|
+
assert_equal expected, actual
|
|
835
|
+
end
|
|
836
|
+
|
|
837
|
+
def test_assert_raises__regexp_err
|
|
838
|
+
@assertion_count = 0
|
|
839
|
+
|
|
840
|
+
e = assert_raises TypeError do
|
|
841
|
+
@tc.assert_raises RuntimeError, %r%does not work%, "assertion message" do
|
|
842
|
+
raise SomeError, "blah"
|
|
843
|
+
end
|
|
844
|
+
end
|
|
845
|
+
|
|
846
|
+
expected = <<~EOM.chomp
|
|
847
|
+
class or module required for rescue clause. Got [RuntimeError, /does not work/]
|
|
848
|
+
EOM
|
|
849
|
+
|
|
850
|
+
actual = e.message
|
|
851
|
+
|
|
852
|
+
assert_equal expected, actual
|
|
853
|
+
end
|
|
854
|
+
|
|
855
|
+
def test_assert_raises__regexp_err_default
|
|
856
|
+
@assertion_count = 0
|
|
857
|
+
|
|
858
|
+
e = assert_raises TypeError do
|
|
859
|
+
@tc.assert_raises %r%does not work% do
|
|
860
|
+
raise "blah"
|
|
861
|
+
end
|
|
862
|
+
end
|
|
863
|
+
|
|
864
|
+
expected = <<~EOM.chomp
|
|
865
|
+
class or module required for rescue clause. Got [/does not work/]
|
|
866
|
+
EOM
|
|
867
|
+
|
|
868
|
+
actual = e.message
|
|
869
|
+
|
|
870
|
+
assert_equal expected, actual
|
|
871
|
+
end
|
|
872
|
+
|
|
813
873
|
def test_assert_raises_subclass
|
|
814
874
|
@tc.assert_raises StandardError do
|
|
815
875
|
raise AnError
|
|
@@ -960,6 +1020,12 @@ class TestMinitestAssertions < Minitest::Test
|
|
|
960
1020
|
end
|
|
961
1021
|
end
|
|
962
1022
|
|
|
1023
|
+
def test_assert_same__does_not_allow_lhs_nil
|
|
1024
|
+
assert_triggered(/Use assert_nil if expecting nil/) do
|
|
1025
|
+
@tc.assert_same nil, nil
|
|
1026
|
+
end
|
|
1027
|
+
end
|
|
1028
|
+
|
|
963
1029
|
def test_assert_silent
|
|
964
1030
|
@assertion_count = 2
|
|
965
1031
|
|
|
@@ -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
|
@@ -1,2 +1 @@
|
|
|
1
|
-
�o
|
|
2
|
-
Ba]E�.��F��(o:5p�85��?Q��R;]��[fQ�&��T�҃U
|
|
3
|
-
���D
|
|
4
|
-
q�{<�'�'l*��ׇ��Q�V���9��E�xY�Sy&ğp�1b�9E)��J-���(�]��>��VAs_�-��L����h��P%�~����v�C�科���|wFe ����{��}��uV[���j���5���G����p�b�l_JU�B-�
|
|
1
|
+
�yt݆xByR����>lb�fp�OK��[�NZPA�;��C�e�M&@�}Ӻ��8��� $�'ȟ��El4k��=����ܢ�0�2°l*O�^p�OfM�psj��ڦ~R��SEJ��7J،���"��>加�.z��iw0���Xqq+����W��T�T�0�c2�*�˛D�>��O+=�6�14i�$ݣ�%Թ���2��U���P���C2���N9Z�C#ŗo"�b�ݿ�Q@��j
|
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.6
|
|
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.7'
|
|
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.7'
|
|
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
|