minitest 5.22.3 → 5.25.4

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.
@@ -1,17 +1,14 @@
1
- # encoding: UTF-8
2
-
3
1
  require "minitest/autorun"
4
-
5
- if defined? Encoding then
6
- e = Encoding.default_external
7
- if e != Encoding::UTF_8 then
8
- warn ""
9
- warn ""
10
- warn "NOTE: External encoding #{e} is not UTF-8. Tests WILL fail."
11
- warn " Run tests with `RUBYOPT=-Eutf-8 rake` to avoid errors."
12
- warn ""
13
- warn ""
14
- end
2
+ require_relative "metametameta"
3
+
4
+ e = Encoding.default_external
5
+ if e != Encoding::UTF_8 then
6
+ warn ""
7
+ warn ""
8
+ warn "NOTE: External encoding #{e} is not UTF-8. Tests WILL fail."
9
+ warn " Run tests with `RUBYOPT=-Eutf-8 rake` to avoid errors."
10
+ warn ""
11
+ warn ""
15
12
  end
16
13
 
17
14
  SomeError = Class.new Exception
@@ -26,14 +23,11 @@ class TestMinitestAssertions < Minitest::Test
26
23
  # which is not threadsafe. Nearly every method in here is an
27
24
  # assertion test so it isn't worth splitting it out further.
28
25
 
29
- RUBY18 = !defined? Encoding
30
-
31
26
  # not included in JRuby
32
27
  RE_LEVELS = /\(\d+ levels\) /
33
28
 
34
29
  class DummyTest
35
30
  include Minitest::Assertions
36
- # include Minitest::Reportable # TODO: why do I really need this?
37
31
 
38
32
  attr_accessor :assertions, :failure
39
33
 
@@ -58,15 +52,6 @@ class TestMinitestAssertions < Minitest::Test
58
52
  "expected #{@assertion_count} assertions to be fired during the test, not #{@tc.assertions}")
59
53
  end
60
54
 
61
- def assert_deprecated name
62
- dep = /DEPRECATED: #{name}. From #{__FILE__}:\d+(?::.*)?/
63
- dep = "" if $-w.nil?
64
-
65
- assert_output nil, dep do
66
- yield
67
- end
68
- end
69
-
70
55
  def assert_triggered expected, klass = Minitest::Assertion
71
56
  e = assert_raises klass do
72
57
  yield
@@ -88,10 +73,6 @@ class TestMinitestAssertions < Minitest::Test
88
73
  end
89
74
  end
90
75
 
91
- def clean s
92
- s.gsub(/^ {6,10}/, "")
93
- end
94
-
95
76
  def non_verbose
96
77
  orig_verbose = $VERBOSE
97
78
  $VERBOSE = false
@@ -144,36 +125,43 @@ class TestMinitestAssertions < Minitest::Test
144
125
  end
145
126
 
146
127
  def test_assert_equal_different_collection_array_hex_invisible
147
- object1 = Object.new
148
- object2 = Object.new
149
- msg = "No visible difference in the Array#inspect output.
128
+ exp = Object.new
129
+ act = Object.new
130
+ msg = <<~EOM.chomp
131
+ No visible difference in the Array#inspect output.
150
132
  You should look at the implementation of #== on Array or its members.
151
- [#<Object:0xXXXXXX>]".gsub(/^ +/, "")
133
+ [#<Object:0xXXXXXX>]
134
+ EOM
152
135
  assert_triggered msg do
153
- @tc.assert_equal [object1], [object2]
136
+ @tc.assert_equal [exp], [act]
154
137
  end
155
138
  end
156
139
 
157
140
  def test_assert_equal_different_collection_hash_hex_invisible
158
- h1, h2 = {}, {}
159
- h1[1] = Object.new
160
- h2[1] = Object.new
161
- msg = "No visible difference in the Hash#inspect output.
141
+ exp, act = {}, {}
142
+ exp[1] = Object.new
143
+ act[1] = Object.new
144
+ act_obj = act[1]
145
+ # TODO: switch to endless when 2.7 is dropped
146
+ act_obj.define_singleton_method(:inspect) { "#<Object:0xXXXXXX>" }
147
+ msg = <<~EOM.chomp % [act]
148
+ No visible difference in the Hash#inspect output.
162
149
  You should look at the implementation of #== on Hash or its members.
163
- {1=>#<Object:0xXXXXXX>}".gsub(/^ +/, "")
150
+ %p
151
+ EOM
164
152
 
165
153
  assert_triggered msg do
166
- @tc.assert_equal h1, h2
154
+ @tc.assert_equal exp, act
167
155
  end
168
156
  end
169
157
 
170
158
  def test_assert_equal_different_diff_deactivated
171
159
  without_diff do
172
160
  assert_triggered util_msg("haha" * 10, "blah" * 10) do
173
- o1 = "haha" * 10
174
- o2 = "blah" * 10
161
+ exp = "haha" * 10
162
+ act = "blah" * 10
175
163
 
176
- @tc.assert_equal o1, o2
164
+ @tc.assert_equal exp, act
177
165
  end
178
166
  end
179
167
  end
@@ -195,78 +183,84 @@ class TestMinitestAssertions < Minitest::Test
195
183
  def initialize s; @name = s; end
196
184
  end
197
185
 
198
- o1 = c.new "a"
199
- o2 = c.new "b"
200
- msg = clean <<-EOS
186
+ exp = c.new "a"
187
+ act = c.new "b"
188
+ msg = <<~EOS
201
189
  --- expected
202
190
  +++ actual
203
191
  @@ -1 +1 @@
204
- -#<#<Class:0xXXXXXX>:0xXXXXXX @name=\"a\">
205
- +#<#<Class:0xXXXXXX>:0xXXXXXX @name=\"b\">
192
+ -#<#<Class:0xXXXXXX>:0xXXXXXX @name="a">
193
+ +#<#<Class:0xXXXXXX>:0xXXXXXX @name="b">
206
194
  EOS
207
195
 
208
196
  assert_triggered msg do
209
- @tc.assert_equal o1, o2
197
+ @tc.assert_equal exp, act
210
198
  end
211
199
  end
212
200
 
213
201
  def test_assert_equal_different_hex_invisible
214
- o1 = Object.new
215
- o2 = Object.new
202
+ exp = Object.new
203
+ act = Object.new
216
204
 
217
- msg = "No visible difference in the Object#inspect output.
205
+ msg = <<~EOM.chomp
206
+ No visible difference in the Object#inspect output.
218
207
  You should look at the implementation of #== on Object or its members.
219
- #<Object:0xXXXXXX>".gsub(/^ +/, "")
208
+ #<Object:0xXXXXXX>
209
+ EOM
220
210
 
221
211
  assert_triggered msg do
222
- @tc.assert_equal o1, o2
212
+ @tc.assert_equal exp, act
223
213
  end
224
214
  end
225
215
 
226
216
  def test_assert_equal_different_long
227
- msg = "--- expected
217
+ msg = <<~EOM
218
+ --- expected
228
219
  +++ actual
229
220
  @@ -1 +1 @@
230
- -\"hahahahahahahahahahahahahahahahahahahaha\"
231
- +\"blahblahblahblahblahblahblahblahblahblah\"
232
- ".gsub(/^ +/, "")
221
+ -"hahahahahahahahahahahahahahahahahahahaha"
222
+ +"blahblahblahblahblahblahblahblahblahblah"
223
+ EOM
233
224
 
234
225
  assert_triggered msg do
235
- o1 = "haha" * 10
236
- o2 = "blah" * 10
226
+ exp = "haha" * 10
227
+ act = "blah" * 10
237
228
 
238
- @tc.assert_equal o1, o2
229
+ @tc.assert_equal exp, act
239
230
  end
240
231
  end
241
232
 
242
233
  def test_assert_equal_different_long_invisible
243
- msg = "No visible difference in the String#inspect output.
234
+ msg = <<~EOM.chomp
235
+ No visible difference in the String#inspect output.
244
236
  You should look at the implementation of #== on String or its members.
245
- \"blahblahblahblahblahblahblahblahblahblah\"".gsub(/^ +/, "")
237
+ "blahblahblahblahblahblahblahblahblahblah"
238
+ EOM
246
239
 
247
240
  assert_triggered msg do
248
- o1 = "blah" * 10
249
- o2 = "blah" * 10
250
- def o1.== _
241
+ exp = "blah" * 10
242
+ act = "blah" * 10
243
+ def exp.== _
251
244
  false
252
245
  end
253
- @tc.assert_equal o1, o2
246
+ @tc.assert_equal exp, act
254
247
  end
255
248
  end
256
249
 
257
250
  def test_assert_equal_different_long_msg
258
- msg = "message.
251
+ msg = <<~EOM
252
+ message.
259
253
  --- expected
260
254
  +++ actual
261
255
  @@ -1 +1 @@
262
- -\"hahahahahahahahahahahahahahahahahahahaha\"
263
- +\"blahblahblahblahblahblahblahblahblahblah\"
264
- ".gsub(/^ +/, "")
256
+ -"hahahahahahahahahahahahahahahahahahahaha"
257
+ +"blahblahblahblahblahblahblahblahblahblah"
258
+ EOM
265
259
 
266
260
  assert_triggered msg do
267
- o1 = "haha" * 10
268
- o2 = "blah" * 10
269
- @tc.assert_equal o1, o2, "message"
261
+ exp = "haha" * 10
262
+ act = "blah" * 10
263
+ @tc.assert_equal exp, act, "message"
270
264
  end
271
265
  end
272
266
 
@@ -290,7 +284,7 @@ class TestMinitestAssertions < Minitest::Test
290
284
  end
291
285
 
292
286
  def test_assert_equal_does_not_allow_lhs_nil
293
- if Minitest::VERSION =~ /^6/ then
287
+ if Minitest::VERSION >= "6" then
294
288
  warn "Time to strip the MT5 test"
295
289
 
296
290
  @assertion_count += 1
@@ -301,7 +295,7 @@ class TestMinitestAssertions < Minitest::Test
301
295
  err_re = /Use assert_nil if expecting nil from .*test_minitest_\w+.rb/
302
296
  err_re = "" if $-w.nil?
303
297
 
304
- assert_output "", err_re do
298
+ assert_deprecation err_re do
305
299
  @tc.assert_equal nil, nil
306
300
  end
307
301
  end
@@ -314,29 +308,23 @@ class TestMinitestAssertions < Minitest::Test
314
308
  end
315
309
 
316
310
  def test_assert_equal_string_bug791
317
- exp = <<-'EOF'.gsub(/^ {10}/, "") # note single quotes
318
- --- expected
319
- +++ actual
320
- @@ -1,2 +1 @@
321
- -"\\n
322
- -"
323
- +"\\\"
324
- EOF
325
-
326
- exp = "Expected: \"\\\\n\"\n Actual: \"\\\\\""
311
+ exp = <<~EOM.chomp
312
+ Expected: "\\\\n"
313
+ Actual: "\\\\"
314
+ EOM
327
315
  assert_triggered exp do
328
316
  @tc.assert_equal "\\n", "\\"
329
317
  end
330
318
  end
331
319
 
332
320
  def test_assert_equal_string_both_escaped_unescaped_newlines
333
- msg = <<-EOM.gsub(/^ {10}/, "")
321
+ msg = <<~EOM
334
322
  --- expected
335
323
  +++ actual
336
324
  @@ -1,2 +1 @@
337
- -\"A\\n
338
- -B\"
339
- +\"A\\n\\\\nB\"
325
+ -"A\\n
326
+ -B"
327
+ +"A\\n\\\\nB"
340
328
  EOM
341
329
 
342
330
  assert_triggered msg do
@@ -348,7 +336,7 @@ class TestMinitestAssertions < Minitest::Test
348
336
  end
349
337
 
350
338
  def test_assert_equal_string_encodings
351
- msg = <<-EOM.gsub(/^ {10}/, "")
339
+ msg = <<~EOM
352
340
  --- expected
353
341
  +++ actual
354
342
  @@ -1,3 +1,3 @@
@@ -360,14 +348,14 @@ class TestMinitestAssertions < Minitest::Test
360
348
  EOM
361
349
 
362
350
  assert_triggered msg do
363
- x = "bad-utf8-\xF1.txt"
364
- y = x.dup.force_encoding "binary" # TODO: switch to .b when 1.9 dropped
365
- @tc.assert_equal x, y
351
+ exp = "bad-utf8-\xF1.txt"
352
+ act = exp.dup.b
353
+ @tc.assert_equal exp, act
366
354
  end
367
- end unless RUBY18
355
+ end
368
356
 
369
357
  def test_assert_equal_string_encodings_both_different
370
- msg = <<-EOM.gsub(/^ {10}/, "")
358
+ msg = <<~EOM
371
359
  --- expected
372
360
  +++ actual
373
361
  @@ -1,3 +1,3 @@
@@ -379,14 +367,14 @@ class TestMinitestAssertions < Minitest::Test
379
367
  EOM
380
368
 
381
369
  assert_triggered msg do
382
- x = "bad-utf8-\xF1.txt".force_encoding "ASCII"
383
- y = x.dup.force_encoding "binary" # TODO: switch to .b when 1.9 dropped
384
- @tc.assert_equal x, y
370
+ exp = "bad-utf8-\xF1.txt".dup.force_encoding Encoding::ASCII
371
+ act = exp.dup.b
372
+ @tc.assert_equal exp, act
385
373
  end
386
- end unless RUBY18
374
+ end
387
375
 
388
376
  def test_assert_equal_unescape_newlines
389
- msg = <<-'EOM'.gsub(/^ {10}/, "") # NOTE single quotes on heredoc
377
+ msg = <<~'EOM' # NOTE single quotes on heredoc
390
378
  --- expected
391
379
  +++ actual
392
380
  @@ -1,2 +1,2 @@
@@ -438,7 +426,7 @@ class TestMinitestAssertions < Minitest::Test
438
426
  end
439
427
 
440
428
  def test_assert_in_epsilon_triggered_negative_case
441
- x = (RUBY18 and not maglev?) ? "0.1" : "0.100000xxx"
429
+ x = "0.100000xxx"
442
430
  y = "0.1"
443
431
  assert_triggered "Expected |-1.1 - -1| (#{x}) to be <= #{y}." do
444
432
  @tc.assert_in_epsilon(-1.1, -1, 0.1)
@@ -728,6 +716,7 @@ class TestMinitestAssertions < Minitest::Test
728
716
  end
729
717
  end
730
718
  end
719
+
731
720
  def test_assert_predicate
732
721
  @tc.assert_predicate "", :empty?
733
722
  end
@@ -757,17 +746,17 @@ class TestMinitestAssertions < Minitest::Test
757
746
  end
758
747
  end
759
748
 
760
- expected = clean <<-EOM.chomp
749
+ expected = <<~EOM.chomp
761
750
  [StandardError] exception expected, not
762
751
  Class: <SomeError>
763
- Message: <\"blah\">
752
+ Message: <"blah">
764
753
  ---Backtrace---
765
- FILE:LINE:in \'block in test_assert_raises_default_triggered\'
754
+ FILE:LINE:in 'block in test_assert_raises_default_triggered'
766
755
  ---------------
767
756
  EOM
768
757
 
769
758
  actual = e.message.gsub(/^.+:\d+/, "FILE:LINE")
770
- actual.gsub!(RE_LEVELS, "") unless jruby?
759
+ actual.gsub! RE_LEVELS, "" unless jruby?
771
760
  actual.gsub!(/[`']block in (?:TestMinitestAssertions#)?/, "'block in ")
772
761
 
773
762
  assert_equal expected, actual
@@ -837,17 +826,17 @@ class TestMinitestAssertions < Minitest::Test
837
826
  end
838
827
  end
839
828
 
840
- expected = clean <<-EOM
829
+ expected = <<~EOM
841
830
  [SomeError] exception expected, not
842
831
  Class: <AnError>
843
- Message: <\"some message\">
832
+ Message: <"some message">
844
833
  ---Backtrace---
845
- FILE:LINE:in \'block in test_assert_raises_subclass_triggered\'
834
+ FILE:LINE:in 'block in test_assert_raises_subclass_triggered'
846
835
  ---------------
847
836
  EOM
848
837
 
849
838
  actual = e.message.gsub(/^.+:\d+/, "FILE:LINE")
850
- actual.gsub!(RE_LEVELS, "") unless jruby?
839
+ actual.gsub! RE_LEVELS, "" unless jruby?
851
840
  actual.gsub!(/[`']block in (?:TestMinitestAssertions#)?/, "'block in ")
852
841
 
853
842
  assert_equal expected.chomp, actual
@@ -860,17 +849,17 @@ class TestMinitestAssertions < Minitest::Test
860
849
  end
861
850
  end
862
851
 
863
- expected = clean <<-EOM.chomp
852
+ expected = <<~EOM.chomp
864
853
  [RuntimeError] exception expected, not
865
854
  Class: <SyntaxError>
866
- Message: <\"icky\">
855
+ Message: <"icky">
867
856
  ---Backtrace---
868
- FILE:LINE:in \'block in test_assert_raises_triggered_different\'
857
+ FILE:LINE:in 'block in test_assert_raises_triggered_different'
869
858
  ---------------
870
859
  EOM
871
860
 
872
861
  actual = e.message.gsub(/^.+:\d+/, "FILE:LINE")
873
- actual.gsub!(RE_LEVELS, "") unless jruby?
862
+ actual.gsub! RE_LEVELS, "" unless jruby?
874
863
  actual.gsub!(/[`']block in (?:TestMinitestAssertions#)?/, "'block in ")
875
864
 
876
865
  assert_equal expected, actual
@@ -883,18 +872,18 @@ class TestMinitestAssertions < Minitest::Test
883
872
  end
884
873
  end
885
874
 
886
- expected = clean <<-EOM
875
+ expected = <<~EOM
887
876
  XXX.
888
877
  [RuntimeError] exception expected, not
889
878
  Class: <SyntaxError>
890
- Message: <\"icky\">
879
+ Message: <"icky">
891
880
  ---Backtrace---
892
- FILE:LINE:in \'block in test_assert_raises_triggered_different_msg\'
881
+ FILE:LINE:in 'block in test_assert_raises_triggered_different_msg'
893
882
  ---------------
894
883
  EOM
895
884
 
896
885
  actual = e.message.gsub(/^.+:\d+/, "FILE:LINE")
897
- actual.gsub!(RE_LEVELS, "") unless jruby?
886
+ actual.gsub! RE_LEVELS, "" unless jruby?
898
887
  actual.gsub!(/[`']block in (?:TestMinitestAssertions#)?/, "'block in ")
899
888
 
900
889
  assert_equal expected.chomp, actual
@@ -966,8 +955,8 @@ class TestMinitestAssertions < Minitest::Test
966
955
  @tc.assert_same 1, 2
967
956
  end
968
957
 
969
- s1 = "blah"
970
- s2 = "blah"
958
+ s1 = +"blah"
959
+ s2 = +"blah"
971
960
 
972
961
  assert_triggered 'Expected "blah" (oid=N) to be the same as "blah" (oid=N).' do
973
962
  @tc.assert_same s1, s2
@@ -975,16 +964,24 @@ class TestMinitestAssertions < Minitest::Test
975
964
  end
976
965
 
977
966
  def test_assert_send
978
- assert_deprecated :assert_send do
967
+ @assertion_count = 0 if error_on_warn?
968
+ assert_deprecation(/DEPRECATED: assert_send/) do
979
969
  @tc.assert_send [1, :<, 2]
980
970
  end
981
971
  end
982
972
 
983
973
  def test_assert_send_bad
984
- assert_deprecated :assert_send do
985
- assert_triggered "Expected 1.>(*[2]) to return true." do
974
+ if error_on_warn? then
975
+ @assertion_count = 0
976
+ assert_deprecation(/DEPRECATED: assert_send/) do
986
977
  @tc.assert_send [1, :>, 2]
987
978
  end
979
+ else
980
+ assert_triggered "Expected 1.>(*[2]) to return true." do
981
+ assert_deprecation(/DEPRECATED: assert_send/) do
982
+ @tc.assert_send [1, :>, 2]
983
+ end
984
+ end
988
985
  end
989
986
  end
990
987
 
@@ -1155,8 +1152,8 @@ class TestMinitestAssertions < Minitest::Test
1155
1152
 
1156
1153
  non_verbose do
1157
1154
  out, err = capture_subprocess_io do
1158
- system("echo hi")
1159
- system("echo bye! 1>&2")
1155
+ system "echo hi"
1156
+ system "echo bye! 1>&2"
1160
1157
  end
1161
1158
 
1162
1159
  assert_equal "hi\n", out
@@ -1502,7 +1499,7 @@ class TestMinitestAssertions < Minitest::Test
1502
1499
  d0 = Time.now
1503
1500
  d1 = d0 + 86_400 # I am an idiot
1504
1501
 
1505
- assert_output "", /Stale skip_until \"not yet\" at .*?:\d+$/ do
1502
+ assert_deprecation(/Stale skip_until \"not yet\" at .*?:\d+$/) do
1506
1503
  assert_skip_until d0, "not yet"
1507
1504
  end
1508
1505
 
@@ -1549,9 +1546,11 @@ class TestMinitestAssertionHelpers < Minitest::Test
1549
1546
  end
1550
1547
 
1551
1548
  def test_diff_equal
1552
- msg = "No visible difference in the String#inspect output.
1549
+ msg = <<~EOM.chomp
1550
+ No visible difference in the String#inspect output.
1553
1551
  You should look at the implementation of #== on String or its members.
1554
- \"blahblahblahblahblahblahblahblahblahblah\"".gsub(/^ +/, "")
1552
+ "blahblahblahblahblahblahblahblahblahblah"
1553
+ EOM
1555
1554
 
1556
1555
  o1 = "blah" * 10
1557
1556
  o2 = "blah" * 10
@@ -1563,7 +1562,7 @@ class TestMinitestAssertionHelpers < Minitest::Test
1563
1562
  end
1564
1563
 
1565
1564
  def test_diff_str_mixed
1566
- msg = <<-'EOM'.gsub(/^ {10}/, "") # NOTE single quotes on heredoc
1565
+ msg = <<~'EOM' # NOTE single quotes on heredoc
1567
1566
  --- expected
1568
1567
  +++ actual
1569
1568
  @@ -1 +1 @@
@@ -1578,7 +1577,7 @@ class TestMinitestAssertionHelpers < Minitest::Test
1578
1577
  end
1579
1578
 
1580
1579
  def test_diff_str_multiline
1581
- msg = <<-'EOM'.gsub(/^ {10}/, "") # NOTE single quotes on heredoc
1580
+ msg = <<~EOM
1582
1581
  --- expected
1583
1582
  +++ actual
1584
1583
  @@ -1,2 +1,2 @@
@@ -1594,7 +1593,7 @@ class TestMinitestAssertionHelpers < Minitest::Test
1594
1593
  end
1595
1594
 
1596
1595
  def test_diff_str_simple
1597
- msg = <<-'EOM'.gsub(/^ {10}/, "").chomp # NOTE single quotes on heredoc
1596
+ msg = <<~EOM.chomp
1598
1597
  Expected: "A"
1599
1598
  Actual: "B"
1600
1599
  EOM
@@ -1646,14 +1645,14 @@ class TestMinitestAssertionHelpers < Minitest::Test
1646
1645
  end
1647
1646
 
1648
1647
  def test_mu_pp_for_diff_str_bad_encoding
1649
- str = "\666".force_encoding Encoding::UTF_8
1648
+ str = "\666".dup.force_encoding Encoding::UTF_8
1650
1649
  exp = "# encoding: UTF-8\n# valid: false\n\"\\xB6\""
1651
1650
 
1652
1651
  assert_mu_pp_for_diff exp, str, :raw
1653
1652
  end
1654
1653
 
1655
1654
  def test_mu_pp_for_diff_str_bad_encoding_both
1656
- str = "\666A\\n\nB".force_encoding Encoding::UTF_8
1655
+ str = "\666A\\n\nB".dup.force_encoding Encoding::UTF_8
1657
1656
  exp = "# encoding: UTF-8\n# valid: false\n\"\\xB6A\\\\n\\nB\""
1658
1657
 
1659
1658
  assert_mu_pp_for_diff exp, str, :raw
@@ -1700,7 +1699,7 @@ class TestMinitestAssertionHelpers < Minitest::Test
1700
1699
  end
1701
1700
 
1702
1701
  def test_mu_pp_str_bad_encoding
1703
- str = "\666".force_encoding Encoding::UTF_8
1702
+ str = "\666".dup.force_encoding Encoding::UTF_8
1704
1703
  exp = "# encoding: UTF-8\n# valid: false\n\"\\xB6\""
1705
1704
 
1706
1705
  assert_mu_pp exp, str, :raw
@@ -17,7 +17,7 @@ class TestMinitestBenchmark < Minitest::Test
17
17
  def test_cls_runnable_methods
18
18
  assert_equal [], Minitest::Benchmark.runnable_methods
19
19
 
20
- c = Class.new(Minitest::Benchmark) do
20
+ c = Class.new Minitest::Benchmark do
21
21
  def bench_blah
22
22
  end
23
23
  end