@@ -239,7 +239,7 @@ def test_measure
239
239
)
240
240
241
241
assert_empty err
242
- assert_match ( /\A (TIME is added\. \n => nil \ n processing time: .+\n => 3\n => nil \n => 3\n ){2}/ , out )
242
+ assert_match ( /\A (TIME is added\. \n processing time: .+\n => 3\n => 3\n ){2}/ , out )
243
243
assert_empty ( c . class_variables )
244
244
end
245
245
@@ -266,7 +266,7 @@ def test_measure_keeps_previous_value
266
266
)
267
267
268
268
assert_empty err
269
- assert_match ( /\A TIME is added\. \n => nil \ n processing time: .+\n => 3\n processing time: .+\n => 3/ , out )
269
+ assert_match ( /\A TIME is added\. \n processing time: .+\n => 3\n processing time: .+\n => 3/ , out )
270
270
assert_empty ( c . class_variables )
271
271
end
272
272
@@ -291,7 +291,7 @@ def test_measure_enabled_by_rc
291
291
)
292
292
293
293
assert_empty err
294
- assert_match ( /\A processing time: .+\n => 3\n => nil \n => 3\n / , out )
294
+ assert_match ( /\A processing time: .+\n => 3\n => 3\n / , out )
295
295
end
296
296
297
297
def test_measure_enabled_by_rc_with_custom
@@ -321,7 +321,7 @@ def test_measure_enabled_by_rc_with_custom
321
321
conf : conf ,
322
322
)
323
323
assert_empty err
324
- assert_match ( /\A custom processing time: .+\n => 3\n => nil \n => 3\n / , out )
324
+ assert_match ( /\A custom processing time: .+\n => 3\n => 3\n / , out )
325
325
end
326
326
327
327
def test_measure_with_custom
@@ -353,7 +353,7 @@ def test_measure_with_custom
353
353
)
354
354
355
355
assert_empty err
356
- assert_match ( /\A => 3\n CUSTOM is added\. \n => nil \ n custom processing time: .+\n => 3\n => nil \n => 3\n / , out )
356
+ assert_match ( /\A => 3\n CUSTOM is added\. \n custom processing time: .+\n => 3\n => 3\n / , out )
357
357
end
358
358
359
359
def test_measure_toggle
@@ -385,7 +385,7 @@ def test_measure_toggle
385
385
)
386
386
387
387
assert_empty err
388
- assert_match ( /\A FOO is added\. \n => nil \ n foo\n => 1\n BAR is added\. \n => nil \ n bar\n foo\n => 2\n => nil \ n bar\n => 3\n => nil \n => 4\n / , out )
388
+ assert_match ( /\A FOO is added\. \n foo\n => 1\n BAR is added\. \n bar\n foo\n => 2\n bar\n => 3\n => 4\n / , out )
389
389
end
390
390
391
391
def test_measure_with_proc_warning
@@ -410,7 +410,7 @@ def test_measure_with_proc_warning
410
410
)
411
411
412
412
assert_match ( /to add custom measure/ , err )
413
- assert_match ( /\A => 3\n => nil \n => 3\n / , out )
413
+ assert_match ( /\A => 3\n => 3\n / , out )
414
414
assert_empty ( c . class_variables )
415
415
end
416
416
end
@@ -429,8 +429,7 @@ def test_irb_source
429
429
/=> "bug17564"\n / ,
430
430
/=> "bug17564"\n / ,
431
431
/ => "hi"\n / ,
432
- / => nil\n / ,
433
- /=> "hi"\n / ,
432
+ / => "hi"\n / ,
434
433
] , out )
435
434
end
436
435
@@ -457,8 +456,7 @@ def test_irb_load
457
456
/=> "bug17564"\n / ,
458
457
/=> "bug17564"\n / ,
459
458
/ => "hi"\n / ,
460
- / => nil\n / ,
461
- /=> "bug17564"\n / ,
459
+ / => "bug17564"\n / ,
462
460
] , out )
463
461
end
464
462
@@ -760,10 +758,7 @@ def test_ls_with_no_singleton_class
760
758
761
759
class ShowDocTest < CommandTestCase
762
760
def test_show_doc
763
- out , err = execute_lines (
764
- "show_doc String#gsub\n " ,
765
- "\n " ,
766
- )
761
+ out , err = execute_lines ( "show_doc String#gsub" )
767
762
768
763
# the former is what we'd get without document content installed, like on CI
769
764
# the latter is what we may get locally
@@ -776,15 +771,10 @@ def test_show_doc
776
771
end
777
772
778
773
def test_show_doc_without_rdoc
779
- out , err = without_rdoc do
780
- execute_lines (
781
- "show_doc String#gsub\n " ,
782
- "\n " ,
783
- )
774
+ _ , err = without_rdoc do
775
+ execute_lines ( "show_doc String#gsub" )
784
776
end
785
777
786
- # if it fails to require rdoc, it only returns the command object
787
- assert_match ( /=> nil\n / , out )
788
778
assert_include ( err , "Can't display document because `rdoc` is not installed.\n " )
789
779
ensure
790
780
# this is the only way to reset the redefined method without coupling the test with its implementation
0 commit comments