minitest 5.25.5 → 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 +2 -4
- data/History.rdoc +170 -0
- data/Manifest.txt +13 -4
- data/README.rdoc +21 -100
- data/Rakefile +10 -2
- data/bin/minitest +5 -0
- data/design_rationale.rb +21 -19
- data/lib/hoe/minitest.rb +2 -1
- data/lib/minitest/assertions.rb +47 -81
- data/lib/minitest/autorun.rb +3 -4
- data/lib/minitest/benchmark.rb +3 -3
- data/lib/minitest/bisect.rb +304 -0
- data/lib/minitest/complete.rb +56 -0
- data/lib/minitest/find_minimal_combination.rb +127 -0
- data/lib/minitest/hell.rb +1 -1
- data/lib/minitest/manual_plugins.rb +4 -16
- data/lib/minitest/parallel.rb +5 -3
- data/lib/minitest/path_expander.rb +432 -0
- data/lib/minitest/pride.rb +2 -2
- data/lib/minitest/pride_plugin.rb +1 -1
- data/lib/minitest/server.rb +49 -0
- data/lib/minitest/server_plugin.rb +88 -0
- data/lib/minitest/spec.rb +11 -37
- data/lib/minitest/sprint.rb +105 -0
- data/lib/minitest/sprint_plugin.rb +39 -0
- data/lib/minitest/test.rb +8 -13
- data/lib/minitest/test_task.rb +44 -20
- data/lib/minitest.rb +104 -107
- data/test/minitest/metametameta.rb +1 -1
- data/test/minitest/test_bisect.rb +249 -0
- data/test/minitest/test_find_minimal_combination.rb +138 -0
- data/test/minitest/test_minitest_assertions.rb +114 -105
- data/test/minitest/test_minitest_benchmark.rb +14 -0
- data/test/minitest/test_minitest_reporter.rb +6 -5
- data/test/minitest/test_minitest_spec.rb +60 -128
- data/test/minitest/test_minitest_test.rb +22 -101
- data/test/minitest/test_path_expander.rb +229 -0
- data/test/minitest/test_server.rb +146 -0
- data.tar.gz.sig +0 -0
- metadata +92 -33
- metadata.gz.sig +0 -0
- data/.autotest +0 -34
- data/lib/minitest/mock.rb +0 -347
- data/lib/minitest/unit.rb +0 -42
- data/test/minitest/test_minitest_mock.rb +0 -1218
|
@@ -142,8 +142,7 @@ class TestMinitestAssertions < Minitest::Test
|
|
|
142
142
|
exp[1] = Object.new
|
|
143
143
|
act[1] = Object.new
|
|
144
144
|
act_obj = act[1]
|
|
145
|
-
|
|
146
|
-
act_obj.define_singleton_method(:inspect) { "#<Object:0xXXXXXX>" }
|
|
145
|
+
def act_obj.inspect = "#<Object:0xXXXXXX>"
|
|
147
146
|
msg = <<~EOM.chomp % [act]
|
|
148
147
|
No visible difference in the Hash#inspect output.
|
|
149
148
|
You should look at the implementation of #== on Hash or its members.
|
|
@@ -166,14 +165,20 @@ class TestMinitestAssertions < Minitest::Test
|
|
|
166
165
|
end
|
|
167
166
|
end
|
|
168
167
|
|
|
169
|
-
def
|
|
168
|
+
def test_assert_equal_string_message
|
|
170
169
|
assert_triggered "whoops.\nExpected: 1\n Actual: 2" do
|
|
170
|
+
@tc.assert_equal 1, 2, "whoops"
|
|
171
|
+
end
|
|
172
|
+
end
|
|
173
|
+
|
|
174
|
+
def test_assert_equal_different_message
|
|
175
|
+
assert_triggered "whoops." do
|
|
171
176
|
@tc.assert_equal 1, 2, message { "whoops" }
|
|
172
177
|
end
|
|
173
178
|
end
|
|
174
179
|
|
|
175
180
|
def test_assert_equal_different_lambda
|
|
176
|
-
assert_triggered "whoops
|
|
181
|
+
assert_triggered "whoops" do
|
|
177
182
|
@tc.assert_equal 1, 2, lambda { "whoops" }
|
|
178
183
|
end
|
|
179
184
|
end
|
|
@@ -284,26 +289,8 @@ class TestMinitestAssertions < Minitest::Test
|
|
|
284
289
|
end
|
|
285
290
|
|
|
286
291
|
def test_assert_equal_does_not_allow_lhs_nil
|
|
287
|
-
if
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
@assertion_count += 1
|
|
291
|
-
assert_triggered(/Use assert_nil if expecting nil/) do
|
|
292
|
-
@tc.assert_equal nil, nil
|
|
293
|
-
end
|
|
294
|
-
else
|
|
295
|
-
err_re = /Use assert_nil if expecting nil from .*test_minitest_\w+.rb/
|
|
296
|
-
err_re = "" if $-w.nil?
|
|
297
|
-
|
|
298
|
-
assert_deprecation err_re do
|
|
299
|
-
@tc.assert_equal nil, nil
|
|
300
|
-
end
|
|
301
|
-
end
|
|
302
|
-
end
|
|
303
|
-
|
|
304
|
-
def test_assert_equal_does_not_allow_lhs_nil_triggered
|
|
305
|
-
assert_triggered "Expected: nil\n Actual: false" do
|
|
306
|
-
@tc.assert_equal nil, false
|
|
292
|
+
assert_triggered(/Use assert_nil if expecting nil/) do
|
|
293
|
+
@tc.assert_equal nil, nil
|
|
307
294
|
end
|
|
308
295
|
end
|
|
309
296
|
|
|
@@ -318,13 +305,13 @@ class TestMinitestAssertions < Minitest::Test
|
|
|
318
305
|
end
|
|
319
306
|
|
|
320
307
|
def test_assert_equal_string_both_escaped_unescaped_newlines
|
|
321
|
-
msg = <<~EOM
|
|
308
|
+
msg = <<~'EOM' # NOTE: single quotes on heredoc
|
|
322
309
|
--- expected
|
|
323
310
|
+++ actual
|
|
324
311
|
@@ -1,2 +1 @@
|
|
325
|
-
-"A
|
|
312
|
+
-"A\n
|
|
326
313
|
-B"
|
|
327
|
-
+"A\\
|
|
314
|
+
+"A\n\\nB"
|
|
328
315
|
EOM
|
|
329
316
|
|
|
330
317
|
assert_triggered msg do
|
|
@@ -526,10 +513,14 @@ class TestMinitestAssertions < Minitest::Test
|
|
|
526
513
|
end
|
|
527
514
|
|
|
528
515
|
def test_assert_operator
|
|
516
|
+
@assertion_count += 1
|
|
517
|
+
|
|
529
518
|
@tc.assert_operator 2, :>, 1
|
|
530
519
|
end
|
|
531
520
|
|
|
532
521
|
def test_assert_operator_bad_object
|
|
522
|
+
@assertion_count += 1
|
|
523
|
+
|
|
533
524
|
bad = Object.new
|
|
534
525
|
def bad.== _; true end
|
|
535
526
|
|
|
@@ -537,6 +528,8 @@ class TestMinitestAssertions < Minitest::Test
|
|
|
537
528
|
end
|
|
538
529
|
|
|
539
530
|
def test_assert_operator_triggered
|
|
531
|
+
@assertion_count += 1
|
|
532
|
+
|
|
540
533
|
assert_triggered "Expected 2 to be < 1." do
|
|
541
534
|
@tc.assert_operator 2, :<, 1
|
|
542
535
|
end
|
|
@@ -718,10 +711,14 @@ class TestMinitestAssertions < Minitest::Test
|
|
|
718
711
|
end
|
|
719
712
|
|
|
720
713
|
def test_assert_predicate
|
|
714
|
+
@assertion_count += 1
|
|
715
|
+
|
|
721
716
|
@tc.assert_predicate "", :empty?
|
|
722
717
|
end
|
|
723
718
|
|
|
724
719
|
def test_assert_predicate_triggered
|
|
720
|
+
@assertion_count += 1
|
|
721
|
+
|
|
725
722
|
assert_triggered 'Expected "blah" to be empty?.' do
|
|
726
723
|
@tc.assert_predicate "blah", :empty?
|
|
727
724
|
end
|
|
@@ -813,6 +810,66 @@ class TestMinitestAssertions < Minitest::Test
|
|
|
813
810
|
end
|
|
814
811
|
end
|
|
815
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
|
+
|
|
816
873
|
def test_assert_raises_subclass
|
|
817
874
|
@tc.assert_raises StandardError do
|
|
818
875
|
raise AnError
|
|
@@ -963,25 +1020,9 @@ class TestMinitestAssertions < Minitest::Test
|
|
|
963
1020
|
end
|
|
964
1021
|
end
|
|
965
1022
|
|
|
966
|
-
def
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
@tc.assert_send [1, :<, 2]
|
|
970
|
-
end
|
|
971
|
-
end
|
|
972
|
-
|
|
973
|
-
def test_assert_send_bad
|
|
974
|
-
if error_on_warn? then
|
|
975
|
-
@assertion_count = 0
|
|
976
|
-
assert_deprecation(/DEPRECATED: assert_send/) do
|
|
977
|
-
@tc.assert_send [1, :>, 2]
|
|
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
|
|
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
|
|
985
1026
|
end
|
|
986
1027
|
end
|
|
987
1028
|
|
|
@@ -1074,48 +1115,24 @@ class TestMinitestAssertions < Minitest::Test
|
|
|
1074
1115
|
end
|
|
1075
1116
|
|
|
1076
1117
|
def test_assert_pattern
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
"(eval):1: warning: One-line pattern matching is experimental, and the behavior may change in future versions of Ruby!\n"
|
|
1081
|
-
else
|
|
1082
|
-
""
|
|
1083
|
-
end
|
|
1084
|
-
assert_output nil, exp do
|
|
1085
|
-
eval "[1,2,3] => [Integer, Integer, Integer]" # eval to escape parser for ruby<3
|
|
1086
|
-
end
|
|
1087
|
-
end
|
|
1088
|
-
else
|
|
1089
|
-
@assertion_count = 0
|
|
1090
|
-
|
|
1091
|
-
assert_raises NotImplementedError do
|
|
1092
|
-
@tc.assert_pattern do
|
|
1093
|
-
# do nothing
|
|
1094
|
-
end
|
|
1118
|
+
@tc.assert_pattern do
|
|
1119
|
+
assert_output nil, "" do
|
|
1120
|
+
[1,2,3] => [Integer, Integer, Integer]
|
|
1095
1121
|
end
|
|
1096
1122
|
end
|
|
1097
1123
|
end
|
|
1098
1124
|
|
|
1099
1125
|
def test_assert_pattern_traps_nomatchingpatternerror
|
|
1100
|
-
|
|
1101
|
-
exp = if RUBY_VERSION.start_with? "3.0" then
|
|
1102
|
-
"[1, 2, 3]" # terrible error message!
|
|
1103
|
-
else
|
|
1104
|
-
/length mismatch/
|
|
1105
|
-
end
|
|
1126
|
+
exp = /length mismatch/
|
|
1106
1127
|
|
|
1107
1128
|
assert_triggered exp do
|
|
1108
1129
|
@tc.assert_pattern do
|
|
1109
|
-
|
|
1110
|
-
eval "[1,2,3] => [Integer, Integer]" # eval to escape parser for ruby<3
|
|
1111
|
-
end
|
|
1130
|
+
[1,2,3] => [Integer, Integer]
|
|
1112
1131
|
end
|
|
1113
1132
|
end
|
|
1114
1133
|
end
|
|
1115
1134
|
|
|
1116
1135
|
def test_assert_pattern_raises_other_exceptions
|
|
1117
|
-
skip unless RUBY_VERSION >= "3.0"
|
|
1118
|
-
|
|
1119
1136
|
@assertion_count = 0
|
|
1120
1137
|
|
|
1121
1138
|
assert_raises RuntimeError do
|
|
@@ -1126,8 +1143,6 @@ class TestMinitestAssertions < Minitest::Test
|
|
|
1126
1143
|
end
|
|
1127
1144
|
|
|
1128
1145
|
def test_assert_pattern_with_no_block
|
|
1129
|
-
skip unless RUBY_VERSION >= "3.0"
|
|
1130
|
-
|
|
1131
1146
|
assert_triggered "assert_pattern requires a block to capture errors." do
|
|
1132
1147
|
@tc.assert_pattern
|
|
1133
1148
|
end
|
|
@@ -1168,7 +1183,7 @@ class TestMinitestAssertions < Minitest::Test
|
|
|
1168
1183
|
|
|
1169
1184
|
# These don't have corresponding refutes _on purpose_. They're
|
|
1170
1185
|
# useless and will never be added, so don't bother.
|
|
1171
|
-
ignores = %w[assert_output assert_raises
|
|
1186
|
+
ignores = %w[assert_output assert_raises
|
|
1172
1187
|
assert_silent assert_throws assert_mock]
|
|
1173
1188
|
|
|
1174
1189
|
ignores += %w[assert_allocations] # for minitest-gcstats
|
|
@@ -1280,12 +1295,16 @@ class TestMinitestAssertions < Minitest::Test
|
|
|
1280
1295
|
end
|
|
1281
1296
|
|
|
1282
1297
|
def test_refute_in_epsilon_triggered
|
|
1283
|
-
assert_triggered "Expected |10000 -
|
|
1284
|
-
@tc.refute_in_epsilon 10_000,
|
|
1298
|
+
assert_triggered "Expected |10000 - 9991| (9) to not be <= 9.991." do
|
|
1299
|
+
@tc.refute_in_epsilon 10_000, 9991
|
|
1285
1300
|
flunk
|
|
1286
1301
|
end
|
|
1287
1302
|
end
|
|
1288
1303
|
|
|
1304
|
+
def test_refute_in_epsilon_minimum
|
|
1305
|
+
@tc.refute_in_epsilon 10_000, 9990
|
|
1306
|
+
end
|
|
1307
|
+
|
|
1289
1308
|
def test_refute_includes
|
|
1290
1309
|
@assertion_count = 2
|
|
1291
1310
|
|
|
@@ -1365,10 +1384,14 @@ class TestMinitestAssertions < Minitest::Test
|
|
|
1365
1384
|
end
|
|
1366
1385
|
|
|
1367
1386
|
def test_refute_operator
|
|
1387
|
+
@assertion_count += 1
|
|
1388
|
+
|
|
1368
1389
|
@tc.refute_operator 2, :<, 1
|
|
1369
1390
|
end
|
|
1370
1391
|
|
|
1371
1392
|
def test_refute_operator_bad_object
|
|
1393
|
+
@assertion_count += 1
|
|
1394
|
+
|
|
1372
1395
|
bad = Object.new
|
|
1373
1396
|
def bad.== _; true end
|
|
1374
1397
|
|
|
@@ -1376,44 +1399,28 @@ class TestMinitestAssertions < Minitest::Test
|
|
|
1376
1399
|
end
|
|
1377
1400
|
|
|
1378
1401
|
def test_refute_operator_triggered
|
|
1402
|
+
@assertion_count += 1
|
|
1403
|
+
|
|
1379
1404
|
assert_triggered "Expected 2 to not be > 1." do
|
|
1380
1405
|
@tc.refute_operator 2, :>, 1
|
|
1381
1406
|
end
|
|
1382
1407
|
end
|
|
1383
1408
|
|
|
1384
1409
|
def test_refute_pattern
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
capture_io do # 3.0 is noisy
|
|
1388
|
-
eval "[1,2,3] => [Integer, Integer, String]"
|
|
1389
|
-
end
|
|
1390
|
-
end
|
|
1391
|
-
else
|
|
1392
|
-
@assertion_count = 0
|
|
1393
|
-
|
|
1394
|
-
assert_raises NotImplementedError do
|
|
1395
|
-
@tc.refute_pattern do
|
|
1396
|
-
eval "[1,2,3] => [Integer, Integer, String]"
|
|
1397
|
-
end
|
|
1398
|
-
end
|
|
1410
|
+
@tc.refute_pattern do
|
|
1411
|
+
[1,2,3] => [Integer, Integer, String]
|
|
1399
1412
|
end
|
|
1400
1413
|
end
|
|
1401
1414
|
|
|
1402
1415
|
def test_refute_pattern_expects_nomatchingpatternerror
|
|
1403
|
-
skip unless RUBY_VERSION > "3"
|
|
1404
|
-
|
|
1405
1416
|
assert_triggered(/NoMatchingPatternError expected, but nothing was raised./) do
|
|
1406
1417
|
@tc.refute_pattern do
|
|
1407
|
-
|
|
1408
|
-
eval "[1,2,3] => [Integer, Integer, Integer]"
|
|
1409
|
-
end
|
|
1418
|
+
[1,2,3] => [Integer, Integer, Integer]
|
|
1410
1419
|
end
|
|
1411
1420
|
end
|
|
1412
1421
|
end
|
|
1413
1422
|
|
|
1414
1423
|
def test_refute_pattern_raises_other_exceptions
|
|
1415
|
-
skip unless RUBY_VERSION >= "3.0"
|
|
1416
|
-
|
|
1417
1424
|
@assertion_count = 0
|
|
1418
1425
|
|
|
1419
1426
|
assert_raises RuntimeError do
|
|
@@ -1424,18 +1431,20 @@ class TestMinitestAssertions < Minitest::Test
|
|
|
1424
1431
|
end
|
|
1425
1432
|
|
|
1426
1433
|
def test_refute_pattern_with_no_block
|
|
1427
|
-
skip unless RUBY_VERSION >= "3.0"
|
|
1428
|
-
|
|
1429
1434
|
assert_triggered "refute_pattern requires a block to capture errors." do
|
|
1430
1435
|
@tc.refute_pattern
|
|
1431
1436
|
end
|
|
1432
1437
|
end
|
|
1433
1438
|
|
|
1434
1439
|
def test_refute_predicate
|
|
1440
|
+
@assertion_count += 1
|
|
1441
|
+
|
|
1435
1442
|
@tc.refute_predicate "42", :empty?
|
|
1436
1443
|
end
|
|
1437
1444
|
|
|
1438
1445
|
def test_refute_predicate_triggered
|
|
1446
|
+
@assertion_count += 1
|
|
1447
|
+
|
|
1439
1448
|
assert_triggered 'Expected "" to not be empty?.' do
|
|
1440
1449
|
@tc.refute_predicate "", :empty?
|
|
1441
1450
|
end
|
|
@@ -1611,10 +1620,10 @@ class TestMinitestAssertionHelpers < Minitest::Test
|
|
|
1611
1620
|
assert_equal "blah1.\nblah2.", message("blah1") { "blah2" }.call
|
|
1612
1621
|
|
|
1613
1622
|
message = proc { "blah1" }
|
|
1614
|
-
assert_equal "blah1
|
|
1623
|
+
assert_equal "blah1", message(message) { "blah2" }.call
|
|
1615
1624
|
|
|
1616
1625
|
message = message { "blah1" }
|
|
1617
|
-
assert_equal "blah1
|
|
1626
|
+
assert_equal "blah1.", message(message) { "blah2" }.call
|
|
1618
1627
|
end
|
|
1619
1628
|
|
|
1620
1629
|
def test_message_deferred
|
|
@@ -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,5 +1,5 @@
|
|
|
1
1
|
require "minitest/autorun"
|
|
2
|
-
|
|
2
|
+
require_relative "metametameta"
|
|
3
3
|
require "forwardable"
|
|
4
4
|
|
|
5
5
|
class FakeTest < Minitest::Test
|
|
@@ -29,10 +29,11 @@ class TestMinitestReporter < MetaMetaMetaTestCase
|
|
|
29
29
|
super
|
|
30
30
|
self.io = StringIO.new(+"")
|
|
31
31
|
self.r = new_composite_reporter
|
|
32
|
+
@et = @ft = @pt = @st = @sse = nil
|
|
32
33
|
end
|
|
33
34
|
|
|
34
35
|
def error_test
|
|
35
|
-
unless
|
|
36
|
+
unless @et then
|
|
36
37
|
@et = FakeTest.new :woot
|
|
37
38
|
@et.failures << Minitest::UnexpectedError.new(begin
|
|
38
39
|
raise "no"
|
|
@@ -45,7 +46,7 @@ class TestMinitestReporter < MetaMetaMetaTestCase
|
|
|
45
46
|
end
|
|
46
47
|
|
|
47
48
|
def system_stack_error_test
|
|
48
|
-
unless
|
|
49
|
+
unless @sse then
|
|
49
50
|
|
|
50
51
|
ex = SystemStackError.new
|
|
51
52
|
|
|
@@ -64,7 +65,7 @@ class TestMinitestReporter < MetaMetaMetaTestCase
|
|
|
64
65
|
end
|
|
65
66
|
|
|
66
67
|
def fail_test
|
|
67
|
-
unless
|
|
68
|
+
unless @ft then
|
|
68
69
|
@ft = FakeTest.new :woot
|
|
69
70
|
@ft.failures << begin
|
|
70
71
|
raise Minitest::Assertion, "boo"
|
|
@@ -87,7 +88,7 @@ class TestMinitestReporter < MetaMetaMetaTestCase
|
|
|
87
88
|
end
|
|
88
89
|
|
|
89
90
|
def skip_test
|
|
90
|
-
unless
|
|
91
|
+
unless @st then
|
|
91
92
|
@st = FakeTest.new :woot
|
|
92
93
|
@st.failures << begin
|
|
93
94
|
raise Minitest::Skip
|