minitest 5.12.1 → 5.14.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f45ca8b284609e6c73accd4bd7d71144ecb79433ee5039246e2ed83abc87bafe
4
- data.tar.gz: 0f67c6fbd863252ed2421d4c15b018a009d3f53a798c4c882d0135780fda239b
3
+ metadata.gz: 463f6b37e39c4fb39d08330f5a8fdf88fc942796b5df85858681920918dc42d3
4
+ data.tar.gz: 4c3c32504fa31bba4ac7399d878fb1f36961f3647f5cae849f0bbdafa0dacc26
5
5
  SHA512:
6
- metadata.gz: d7d542986e130f4f3288453677aee162e749f94ee26bfec890822d2619908ee983e15990107659c8abfdbb8ec323a318c4d4da8e16d19fb44238db60ded410a7
7
- data.tar.gz: 28ec3b0bf85fd91947a19bcfb02c7c09fdb1b2976f139f320c66fc74a04e8316dd1dbb1f75c47206bedb63ad5f0a77da048ef09ff0377c5aca533fd3164ddb14
6
+ metadata.gz: 1d0bee9dacb54b6c9d04b2ab5d9bc497907af2c468443e4a12aaf7b44fd13aa417c06c9ff9076b76590994e67a722bac7f45ef954c08d0a57c2ce21a19c8c70e
7
+ data.tar.gz: ffc6922ff0a89ab7bbecac705df59b7a285c2d475085ec59e6767cd7f61a14795b9cee253490112932865971c464c4f1a2e7195523a3bba426d434aa06aa3838
Binary file
data.tar.gz.sig CHANGED
Binary file
@@ -1,3 +1,60 @@
1
+ === 5.14.2 / 2020-08-31
2
+
3
+ * 1 bug fix:
4
+
5
+ * Bumped ruby version to include 3.0 (trunk).
6
+
7
+ === 5.14.1 / 2020-05-15
8
+
9
+ * 3 minor enhancements:
10
+
11
+ * Minitest.filter_backtrace returns original backtrace if filter comes back empty.
12
+ * Minitest::BacktraceFilter now returns entire backtrace if $MT_DEBUG set in env.
13
+ * Return true on a successful refute. (jusleg)
14
+
15
+ * 1 bug fix:
16
+
17
+ * Fixed expectation doco to not use global expectations.
18
+
19
+ === 5.14.0 / 2020-01-11
20
+
21
+ * 2 minor enhancements:
22
+
23
+ * Block-assertions (eg assert_output) now error if raised inside the block. (casperisfine)
24
+ * Changed assert_raises to only catch Assertion since that covers Skip and friends.
25
+
26
+ * 3 bug fixes:
27
+
28
+ * Added example for value wrapper with block to Expectations module. (stomar)
29
+ * Fixed use of must/wont_be_within_delta on Expectation instance. (stomar)
30
+ * Renamed UnexpectedError#exception to #error to avoid problems with reraising. (casperisfine)
31
+
32
+ === 5.13.0 / 2019-10-29
33
+
34
+ * 9 minor enhancements:
35
+
36
+ * Added Minitest::Guard#osx?
37
+ * Added examples to documentation for assert_raises. (lxxxvi)
38
+ * Added expectations #path_must_exist and #path_wont_exist. Not thrilled with the names.
39
+ * Added fail_after(year, month, day, msg) to allow time-bombing after a deadline.
40
+ * Added skip_until(year, month, day, msg) to allow deferring until a deadline.
41
+ * Deprecated Minitest::Guard#maglev?
42
+ * Deprecated Minitest::Guard#rubinius?
43
+ * Finally added assert_path_exists and refute_path_exists. (deivid-rodriguez)
44
+ * Refactored and pulled Assertions#things_to_diff out of #diff. (BurdetteLamar)
45
+
46
+ * 3 bug fixes:
47
+
48
+ * Fix autorun bug that affects fork exit status in tests. (dylanahsmith/jhawthorn)
49
+ * Improved documentation for _/value/expect, especially for blocks. (svoop)
50
+ * Support new Proc#to_s format. (ko1)
51
+
52
+ === 5.12.2 / 2019-09-28
53
+
54
+ * 1 bug fix:
55
+
56
+ * After chatting w/ @y-yagi and others, decided to lower support to include ruby 2.2.
57
+
1
58
  === 5.12.1 / 2019-09-28
2
59
 
3
60
  * 1 minor enhancement:
@@ -154,7 +211,7 @@
154
211
  * 2 bug fixes:
155
212
 
156
213
  * Re-release to refresh gem certificate signing. ugh.
157
- * Fixed hoe/minitest to not augment load path if we're actually testing minitest.
214
+ * Fixed hoe/minitest to not augment load path if we're actually testing minitest.
158
215
 
159
216
  === 5.9.0 / 2016-05-16
160
217
 
@@ -178,7 +235,7 @@
178
235
  * 2 bug fixes:
179
236
 
180
237
  * Re-release to refresh gem certificate signing. ugh.
181
- * Fixed hoe/minitest to not augment load path if we're actually testing minitest.
238
+ * Fixed hoe/minitest to not augment load path if we're actually testing minitest.
182
239
 
183
240
  === 5.8.4 / 2016-01-21
184
241
 
@@ -1338,4 +1395,3 @@ back.
1338
1395
  * 1 major enhancement
1339
1396
 
1340
1397
  * Birthday!
1341
-
@@ -677,6 +677,7 @@ minitest-unordered :: Adds a new assertion to minitest for checking the
677
677
  contents of a collection, ignoring element order.
678
678
  minitest-vcr :: Automatic cassette managment with Minitest::Spec
679
679
  and VCR.
680
+ minitest_log :: Adds structured logging, data explication, and verdicts.
680
681
  minitest_owrapper :: Get tests results as a TestResult object.
681
682
  minitest_should :: Shoulda style syntax for minitest test::unit.
682
683
  minitest_tu_shim :: Bridges between test/unit and minitest.
data/Rakefile CHANGED
@@ -11,7 +11,7 @@ Hoe.spec "minitest" do
11
11
 
12
12
  license "MIT"
13
13
 
14
- require_ruby_version "~> 2.3"
14
+ require_ruby_version [">= 2.2", "< 3.1"]
15
15
  end
16
16
 
17
17
  desc "Find missing expectations"
@@ -21,7 +21,7 @@ task :specs do
21
21
  require "minitest/spec"
22
22
 
23
23
  pos_prefix, neg_prefix = "must", "wont"
24
- skip_re = /^(must|wont)$|wont_(throw)|must_(block|not?_|nothing|raise$)/x
24
+ skip_re = /^(must|wont)$|wont_(throw)|must_(block|not?_|nothing|send|raise$)/x
25
25
  dont_flip_re = /(must|wont)_(include|respond_to)/
26
26
 
27
27
  map = {
@@ -32,6 +32,8 @@ task :specs do
32
32
  /_includes/ => "_include",
33
33
  /(must|wont)_(.*_of|nil|silent|empty)/ => '\1_be_\2',
34
34
  /must_raises/ => "must_raise",
35
+ /(must|wont)_predicate/ => '\1_be',
36
+ /(must|wont)_path_exists/ => 'path_\1_exist',
35
37
  }
36
38
 
37
39
  expectations = Minitest::Expectations.public_instance_methods.map(&:to_s)
@@ -8,7 +8,7 @@ require "stringio"
8
8
  # :include: README.rdoc
9
9
 
10
10
  module Minitest
11
- VERSION = "5.12.1" # :nodoc:
11
+ VERSION = "5.14.2" # :nodoc:
12
12
  ENCS = "".respond_to? :encoding # :nodoc:
13
13
 
14
14
  @@installed_at_exit ||= false
@@ -58,7 +58,9 @@ module Minitest
58
58
 
59
59
  exit_code = nil
60
60
 
61
+ pid = Process.pid
61
62
  at_exit {
63
+ next if Process.pid != pid
62
64
  @@after_run.reverse_each(&:call)
63
65
  exit exit_code || false
64
66
  }
@@ -236,7 +238,9 @@ module Minitest
236
238
  end
237
239
 
238
240
  def self.filter_backtrace bt # :nodoc:
239
- backtrace_filter.filter bt
241
+ result = backtrace_filter.filter bt
242
+ result = bt.dup if result.empty?
243
+ result
240
244
  end
241
245
 
242
246
  ##
@@ -905,24 +909,21 @@ module Minitest
905
909
  # Assertion wrapping an unexpected error that was raised during a run.
906
910
 
907
911
  class UnexpectedError < Assertion
908
- attr_accessor :exception # :nodoc:
912
+ # TODO: figure out how to use `cause` instead
913
+ attr_accessor :error # :nodoc:
909
914
 
910
- def initialize exception # :nodoc:
915
+ def initialize error # :nodoc:
911
916
  super "Unexpected exception"
912
- self.exception = exception
917
+ self.error = error
913
918
  end
914
919
 
915
920
  def backtrace # :nodoc:
916
- self.exception.backtrace
917
- end
918
-
919
- def error # :nodoc:
920
- self.exception
921
+ self.error.backtrace
921
922
  end
922
923
 
923
924
  def message # :nodoc:
924
925
  bt = Minitest.filter_backtrace(self.backtrace).join "\n "
925
- "#{self.exception.class}: #{self.exception.message}\n #{bt}"
926
+ "#{self.error.class}: #{self.error.message}\n #{bt}"
926
927
  end
927
928
 
928
929
  def result_label # :nodoc:
@@ -958,6 +959,9 @@ module Minitest
958
959
  # Is this running on maglev?
959
960
 
960
961
  def maglev? platform = defined?(RUBY_ENGINE) && RUBY_ENGINE
962
+ where = Minitest.filter_backtrace(caller).first
963
+ where = where.split(/:in /, 2).first # clean up noise
964
+ warn "DEPRECATED: `maglev?` called from #{where}. This will fail in Minitest 6."
961
965
  "maglev" == platform
962
966
  end
963
967
 
@@ -968,10 +972,20 @@ module Minitest
968
972
  /^ruby/ =~ platform
969
973
  end
970
974
 
975
+ ##
976
+ # Is this running on macOS?
977
+
978
+ def osx? platform = RUBY_PLATFORM
979
+ /darwin/ =~ platform
980
+ end
981
+
971
982
  ##
972
983
  # Is this running on rubinius?
973
984
 
974
985
  def rubinius? platform = defined?(RUBY_ENGINE) && RUBY_ENGINE
986
+ where = Minitest.filter_backtrace(caller).first
987
+ where = where.split(/:in /, 2).first # clean up noise
988
+ warn "DEPRECATED: `rubinius?` called from #{where}. This will fail in Minitest 6."
975
989
  "rbx" == platform
976
990
  end
977
991
 
@@ -993,12 +1007,13 @@ module Minitest
993
1007
  MT_RE = %r%lib/minitest% #:nodoc:
994
1008
 
995
1009
  ##
996
- # Filter +bt+ to something useful. Returns the whole thing if $DEBUG.
1010
+ # Filter +bt+ to something useful. Returns the whole thing if
1011
+ # $DEBUG (ruby) or $MT_DEBUG (env).
997
1012
 
998
1013
  def filter bt
999
1014
  return ["No backtrace"] unless bt
1000
1015
 
1001
- return bt.dup if $DEBUG
1016
+ return bt.dup if $DEBUG || ENV["MT_DEBUG"]
1002
1017
 
1003
1018
  new_bt = bt.take_while { |line| line !~ MT_RE }
1004
1019
  new_bt = bt.select { |line| line !~ MT_RE } if new_bt.empty?
@@ -32,8 +32,6 @@ module Minitest
32
32
  @diff = if (RbConfig::CONFIG["host_os"] =~ /mswin|mingw/ &&
33
33
  system("diff.exe", __FILE__, __FILE__)) then
34
34
  "diff.exe -u"
35
- elsif Minitest::Test.maglev? then
36
- "diff -u"
37
35
  elsif system("gdiff", __FILE__, __FILE__)
38
36
  "gdiff -u" # solaris and kin suck
39
37
  elsif system("diff", __FILE__, __FILE__)
@@ -55,25 +53,16 @@ module Minitest
55
53
  # diff command or if it doesn't make sense to diff the output
56
54
  # (single line, short output), then it simply returns a basic
57
55
  # comparison between the two.
56
+ #
57
+ # See +things_to_diff+ for more info.
58
58
 
59
59
  def diff exp, act
60
- expect = mu_pp_for_diff exp
61
- butwas = mu_pp_for_diff act
62
60
  result = nil
63
61
 
64
- e1, e2 = expect.include?("\n"), expect.include?("\\n")
65
- b1, b2 = butwas.include?("\n"), butwas.include?("\\n")
66
-
67
- need_to_diff =
68
- (e1 ^ e2 ||
69
- b1 ^ b2 ||
70
- expect.size > 30 ||
71
- butwas.size > 30 ||
72
- expect == butwas) &&
73
- Minitest::Assertions.diff
62
+ expect, butwas = things_to_diff(exp, act)
74
63
 
75
64
  return "Expected: #{mu_pp exp}\n Actual: #{mu_pp act}" unless
76
- need_to_diff
65
+ expect
77
66
 
78
67
  Tempfile.open("expect") do |a|
79
68
  a.puts expect
@@ -102,6 +91,34 @@ module Minitest
102
91
  result
103
92
  end
104
93
 
94
+ ##
95
+ # Returns things to diff [expect, butwas], or [nil, nil] if nothing to diff.
96
+ #
97
+ # Criterion:
98
+ #
99
+ # 1. Strings include newlines or escaped newlines, but not both.
100
+ # 2. or: String lengths are > 30 characters.
101
+ # 3. or: Strings are equal to each other (but maybe different encodings?).
102
+ # 4. and: we found a diff executable.
103
+
104
+ def things_to_diff exp, act
105
+ expect = mu_pp_for_diff exp
106
+ butwas = mu_pp_for_diff act
107
+
108
+ e1, e2 = expect.include?("\n"), expect.include?("\\n")
109
+ b1, b2 = butwas.include?("\n"), butwas.include?("\\n")
110
+
111
+ need_to_diff =
112
+ (e1 ^ e2 ||
113
+ b1 ^ b2 ||
114
+ expect.size > 30 ||
115
+ butwas.size > 30 ||
116
+ expect == butwas) &&
117
+ Minitest::Assertions.diff
118
+
119
+ need_to_diff && [expect, butwas]
120
+ end
121
+
105
122
  ##
106
123
  # This returns a human-readable version of +obj+. By default
107
124
  # #inspect is called. You can override this to use #pretty_inspect
@@ -324,6 +341,18 @@ module Minitest
324
341
  x = send out_msg, stdout, out, "In stdout" if out_msg
325
342
 
326
343
  (!stdout || x) && (!stderr || y)
344
+ rescue Assertion
345
+ raise
346
+ rescue => e
347
+ raise UnexpectedError, e
348
+ end
349
+
350
+ ##
351
+ # Fails unless +path+ exists.
352
+
353
+ def assert_path_exists path, msg = nil
354
+ msg = message(msg) { "Expected path '#{path}' to exist" }
355
+ assert File.exist?(path), msg
327
356
  end
328
357
 
329
358
  ##
@@ -346,7 +375,21 @@ module Minitest
346
375
  #
347
376
  # +exp+ takes an optional message on the end to help explain
348
377
  # failures and defaults to StandardError if no exception class is
349
- # passed.
378
+ # passed. Eg:
379
+ #
380
+ # assert_raises(CustomError) { method_with_custom_error }
381
+ #
382
+ # With custom error message:
383
+ #
384
+ # assert_raises(CustomError, 'This should have raised CustomError') { method_with_custom_error }
385
+ #
386
+ # Using the returned object:
387
+ #
388
+ # error = assert_raises(CustomError) do
389
+ # raise CustomError, 'This is really bad'
390
+ # end
391
+ #
392
+ # assert_equal 'This is really bad', error.message
350
393
 
351
394
  def assert_raises *exp
352
395
  flunk "assert_raises requires a block to capture errors." unless
@@ -360,7 +403,7 @@ module Minitest
360
403
  rescue *exp => e
361
404
  pass # count assertion
362
405
  return e
363
- rescue Minitest::Skip, Minitest::Assertion
406
+ rescue Minitest::Assertion # incl Skip & UnexpectedError
364
407
  # don't count assertion
365
408
  raise
366
409
  rescue SignalException, SystemExit
@@ -446,6 +489,10 @@ module Minitest
446
489
  end
447
490
 
448
491
  assert caught, message(msg) { default }
492
+ rescue Assertion
493
+ raise
494
+ rescue => e
495
+ raise UnexpectedError, e
449
496
  end
450
497
 
451
498
  ##
@@ -518,6 +565,11 @@ module Minitest
518
565
  captured_stderr.unlink
519
566
  $stdout.reopen orig_stdout
520
567
  $stderr.reopen orig_stderr
568
+
569
+ orig_stdout.close
570
+ orig_stderr.close
571
+ captured_stdout.close
572
+ captured_stderr.close
521
573
  end
522
574
  end
523
575
  end
@@ -537,7 +589,16 @@ module Minitest
537
589
  end
538
590
 
539
591
  ##
540
- # Fails with +msg+
592
+ # Fails after a given date (in the local time zone). This allows
593
+ # you to put time-bombs in your tests if you need to keep
594
+ # something around until a later date lest you forget about it.
595
+
596
+ def fail_after y,m,d,msg
597
+ flunk msg if Time.now > Time.local(y, m, d)
598
+ end
599
+
600
+ ##
601
+ # Fails with +msg+.
541
602
 
542
603
  def flunk msg = nil
543
604
  msg ||= "Epic Fail!"
@@ -567,7 +628,7 @@ module Minitest
567
628
 
568
629
  def refute test, msg = nil
569
630
  msg ||= message { "Expected #{mu_pp(test)} to not be truthy" }
570
- not assert !test, msg
631
+ assert !test, msg
571
632
  end
572
633
 
573
634
  ##
@@ -671,6 +732,14 @@ module Minitest
671
732
  refute o1.__send__(op, o2), msg
672
733
  end
673
734
 
735
+ ##
736
+ # Fails if +path+ exists.
737
+
738
+ def refute_path_exists path, msg = nil
739
+ msg = message(msg) { "Expected path '#{path}' to not exist" }
740
+ refute File.exist?(path), msg
741
+ end
742
+
674
743
  ##
675
744
  # For testing with predicates.
676
745
  #
@@ -716,6 +785,18 @@ module Minitest
716
785
  raise Minitest::Skip, msg, bt
717
786
  end
718
787
 
788
+ ##
789
+ # Skips the current run until a given date (in the local time
790
+ # zone). This allows you to put some fixes on hold until a later
791
+ # date, but still holds you accountable and prevents you from
792
+ # forgetting it.
793
+
794
+ def skip_until y,m,d,msg
795
+ skip msg if Time.now < Time.local(y, m, d)
796
+ where = caller.first.split(/:/, 3).first(2).join ":"
797
+ warn "Stale skip_until %p at %s" % [msg, where]
798
+ end
799
+
719
800
  ##
720
801
  # Was this testcase skipped? Meant for #teardown.
721
802
 
@@ -9,10 +9,11 @@
9
9
  #
10
10
  # it "should still work in threads" do
11
11
  # my_threaded_thingy do
12
- # (1+1).must_equal 2 # bad
13
- # assert_equal 2, 1+1 # good
14
- # _(1 + 1).must_equal 2 # good
15
- # value(1 + 1).must_equal 2 # good, also #expect
12
+ # (1+1).must_equal 2 # bad
13
+ # assert_equal 2, 1+1 # good
14
+ # _(1 + 1).must_equal 2 # good
15
+ # value(1 + 1).must_equal 2 # good, also #expect
16
+ # _ { 1 + "1" }.must_raise TypeError # good
16
17
  # end
17
18
  # end
18
19
 
@@ -21,7 +22,7 @@ module Minitest::Expectations
21
22
  ##
22
23
  # See Minitest::Assertions#assert_empty.
23
24
  #
24
- # collection.must_be_empty
25
+ # _(collection).must_be_empty
25
26
  #
26
27
  # :method: must_be_empty
27
28
 
@@ -30,7 +31,7 @@ module Minitest::Expectations
30
31
  ##
31
32
  # See Minitest::Assertions#assert_equal
32
33
  #
33
- # a.must_equal b
34
+ # _(a).must_equal b
34
35
  #
35
36
  # :method: must_equal
36
37
 
@@ -39,18 +40,18 @@ module Minitest::Expectations
39
40
  ##
40
41
  # See Minitest::Assertions#assert_in_delta
41
42
  #
42
- # n.must_be_close_to m [, delta]
43
+ # _(n).must_be_close_to m [, delta]
43
44
  #
44
45
  # :method: must_be_close_to
45
46
 
46
47
  infect_an_assertion :assert_in_delta, :must_be_close_to
47
48
 
48
- alias :must_be_within_delta :must_be_close_to # :nodoc:
49
+ infect_an_assertion :assert_in_delta, :must_be_within_delta # :nodoc:
49
50
 
50
51
  ##
51
52
  # See Minitest::Assertions#assert_in_epsilon
52
53
  #
53
- # n.must_be_within_epsilon m [, epsilon]
54
+ # _(n).must_be_within_epsilon m [, epsilon]
54
55
  #
55
56
  # :method: must_be_within_epsilon
56
57
 
@@ -59,7 +60,7 @@ module Minitest::Expectations
59
60
  ##
60
61
  # See Minitest::Assertions#assert_includes
61
62
  #
62
- # collection.must_include obj
63
+ # _(collection).must_include obj
63
64
  #
64
65
  # :method: must_include
65
66
 
@@ -68,7 +69,7 @@ module Minitest::Expectations
68
69
  ##
69
70
  # See Minitest::Assertions#assert_instance_of
70
71
  #
71
- # obj.must_be_instance_of klass
72
+ # _(obj).must_be_instance_of klass
72
73
  #
73
74
  # :method: must_be_instance_of
74
75
 
@@ -77,7 +78,7 @@ module Minitest::Expectations
77
78
  ##
78
79
  # See Minitest::Assertions#assert_kind_of
79
80
  #
80
- # obj.must_be_kind_of mod
81
+ # _(obj).must_be_kind_of mod
81
82
  #
82
83
  # :method: must_be_kind_of
83
84
 
@@ -86,7 +87,7 @@ module Minitest::Expectations
86
87
  ##
87
88
  # See Minitest::Assertions#assert_match
88
89
  #
89
- # a.must_match b
90
+ # _(a).must_match b
90
91
  #
91
92
  # :method: must_match
92
93
 
@@ -95,7 +96,7 @@ module Minitest::Expectations
95
96
  ##
96
97
  # See Minitest::Assertions#assert_nil
97
98
  #
98
- # obj.must_be_nil
99
+ # _(obj).must_be_nil
99
100
  #
100
101
  # :method: must_be_nil
101
102
 
@@ -104,11 +105,11 @@ module Minitest::Expectations
104
105
  ##
105
106
  # See Minitest::Assertions#assert_operator
106
107
  #
107
- # n.must_be :<=, 42
108
+ # _(n).must_be :<=, 42
108
109
  #
109
110
  # This can also do predicates:
110
111
  #
111
- # str.must_be :empty?
112
+ # _(str).must_be :empty?
112
113
  #
113
114
  # :method: must_be
114
115
 
@@ -117,7 +118,7 @@ module Minitest::Expectations
117
118
  ##
118
119
  # See Minitest::Assertions#assert_output
119
120
  #
120
- # proc { ... }.must_output out_or_nil [, err]
121
+ # _ { ... }.must_output out_or_nil [, err]
121
122
  #
122
123
  # :method: must_output
123
124
 
@@ -126,7 +127,7 @@ module Minitest::Expectations
126
127
  ##
127
128
  # See Minitest::Assertions#assert_raises
128
129
  #
129
- # proc { ... }.must_raise exception
130
+ # _ { ... }.must_raise exception
130
131
  #
131
132
  # :method: must_raise
132
133
 
@@ -135,7 +136,7 @@ module Minitest::Expectations
135
136
  ##
136
137
  # See Minitest::Assertions#assert_respond_to
137
138
  #
138
- # obj.must_respond_to msg
139
+ # _(obj).must_respond_to msg
139
140
  #
140
141
  # :method: must_respond_to
141
142
 
@@ -144,7 +145,7 @@ module Minitest::Expectations
144
145
  ##
145
146
  # See Minitest::Assertions#assert_same
146
147
  #
147
- # a.must_be_same_as b
148
+ # _(a).must_be_same_as b
148
149
  #
149
150
  # :method: must_be_same_as
150
151
 
@@ -153,7 +154,7 @@ module Minitest::Expectations
153
154
  ##
154
155
  # See Minitest::Assertions#assert_silent
155
156
  #
156
- # proc { ... }.must_be_silent
157
+ # _ { ... }.must_be_silent
157
158
  #
158
159
  # :method: must_be_silent
159
160
 
@@ -162,16 +163,34 @@ module Minitest::Expectations
162
163
  ##
163
164
  # See Minitest::Assertions#assert_throws
164
165
  #
165
- # proc { ... }.must_throw sym
166
+ # _ { ... }.must_throw sym
166
167
  #
167
168
  # :method: must_throw
168
169
 
169
170
  infect_an_assertion :assert_throws, :must_throw, :block
170
171
 
172
+ ##
173
+ # See Minitest::Assertions#assert_path_exists
174
+ #
175
+ # _(some_path).path_must_exist
176
+ #
177
+ # :method: path_must_exist
178
+
179
+ infect_an_assertion :assert_path_exists, :path_must_exist, :unary
180
+
181
+ ##
182
+ # See Minitest::Assertions#refute_path_exists
183
+ #
184
+ # _(some_path).path_wont_exist
185
+ #
186
+ # :method: path_wont_exist
187
+
188
+ infect_an_assertion :refute_path_exists, :path_wont_exist, :unary
189
+
171
190
  ##
172
191
  # See Minitest::Assertions#refute_empty
173
192
  #
174
- # collection.wont_be_empty
193
+ # _(collection).wont_be_empty
175
194
  #
176
195
  # :method: wont_be_empty
177
196
 
@@ -180,7 +199,7 @@ module Minitest::Expectations
180
199
  ##
181
200
  # See Minitest::Assertions#refute_equal
182
201
  #
183
- # a.wont_equal b
202
+ # _(a).wont_equal b
184
203
  #
185
204
  # :method: wont_equal
186
205
 
@@ -189,18 +208,18 @@ module Minitest::Expectations
189
208
  ##
190
209
  # See Minitest::Assertions#refute_in_delta
191
210
  #
192
- # n.wont_be_close_to m [, delta]
211
+ # _(n).wont_be_close_to m [, delta]
193
212
  #
194
213
  # :method: wont_be_close_to
195
214
 
196
215
  infect_an_assertion :refute_in_delta, :wont_be_close_to
197
216
 
198
- alias :wont_be_within_delta :wont_be_close_to # :nodoc:
217
+ infect_an_assertion :refute_in_delta, :wont_be_within_delta # :nodoc:
199
218
 
200
219
  ##
201
220
  # See Minitest::Assertions#refute_in_epsilon
202
221
  #
203
- # n.wont_be_within_epsilon m [, epsilon]
222
+ # _(n).wont_be_within_epsilon m [, epsilon]
204
223
  #
205
224
  # :method: wont_be_within_epsilon
206
225
 
@@ -209,7 +228,7 @@ module Minitest::Expectations
209
228
  ##
210
229
  # See Minitest::Assertions#refute_includes
211
230
  #
212
- # collection.wont_include obj
231
+ # _(collection).wont_include obj
213
232
  #
214
233
  # :method: wont_include
215
234
 
@@ -218,7 +237,7 @@ module Minitest::Expectations
218
237
  ##
219
238
  # See Minitest::Assertions#refute_instance_of
220
239
  #
221
- # obj.wont_be_instance_of klass
240
+ # _(obj).wont_be_instance_of klass
222
241
  #
223
242
  # :method: wont_be_instance_of
224
243
 
@@ -227,7 +246,7 @@ module Minitest::Expectations
227
246
  ##
228
247
  # See Minitest::Assertions#refute_kind_of
229
248
  #
230
- # obj.wont_be_kind_of mod
249
+ # _(obj).wont_be_kind_of mod
231
250
  #
232
251
  # :method: wont_be_kind_of
233
252
 
@@ -236,7 +255,7 @@ module Minitest::Expectations
236
255
  ##
237
256
  # See Minitest::Assertions#refute_match
238
257
  #
239
- # a.wont_match b
258
+ # _(a).wont_match b
240
259
  #
241
260
  # :method: wont_match
242
261
 
@@ -245,7 +264,7 @@ module Minitest::Expectations
245
264
  ##
246
265
  # See Minitest::Assertions#refute_nil
247
266
  #
248
- # obj.wont_be_nil
267
+ # _(obj).wont_be_nil
249
268
  #
250
269
  # :method: wont_be_nil
251
270
 
@@ -254,7 +273,7 @@ module Minitest::Expectations
254
273
  ##
255
274
  # See Minitest::Assertions#refute_operator
256
275
  #
257
- # n.wont_be :<=, 42
276
+ # _(n).wont_be :<=, 42
258
277
  #
259
278
  # This can also do predicates:
260
279
  #
@@ -267,7 +286,7 @@ module Minitest::Expectations
267
286
  ##
268
287
  # See Minitest::Assertions#refute_respond_to
269
288
  #
270
- # obj.wont_respond_to msg
289
+ # _(obj).wont_respond_to msg
271
290
  #
272
291
  # :method: wont_respond_to
273
292
 
@@ -276,7 +295,7 @@ module Minitest::Expectations
276
295
  ##
277
296
  # See Minitest::Assertions#refute_same
278
297
  #
279
- # a.wont_be_same_as b
298
+ # _(a).wont_be_same_as b
280
299
  #
281
300
  # :method: wont_be_same_as
282
301