Bug #3858
closedtest_capture_io (test/minitest/test_mini_test.rb:837) doesn't pass
Description
=begin
Hi,
test_capture_io in test/minitest/test_mini_test.rb doesn't pass,
because $VERBOSE is nil.
$VERBOSE == nil was fixed at recent commit (that is other test's bug),
but $VERBOSE can't be decide always to !=nil because can't declare
that same bug won't appear.
The patch is below:¶
diff --git test/minitest/test_mini_test.rb test/minitest/test_mini_test.rb
index 1cbc829..bed0521 100644
--- test/minitest/test_mini_test.rb
+++ test/minitest/test_mini_test.rb
@@ -828,6 +828,8 @@ FILE:LINE:in `test_assert_raises_triggered_subclass'
def test_capture_io
@assertion_count = 0
-
orig_verbose = $VERBOSE
-
$VERBOSE = false
out, err = capture_io do
puts 'hi'
warn 'bye!'
@@ -835,6 +837,8 @@ FILE:LINE:in `test_assert_raises_triggered_subclass'assert_equal "hi\n", out
assert_equal "bye!\n", err -
ensure
-
$VERBOSE = orig_verbose
end
def test_class_asserts_match_refutes
Thanks,
Shota Fukumori (sora_h)
=end
Updated by sorah (Sorah Fukumori) over 14 years ago
=begin
Wrote at upstream: http://rubyforge.org/tracker/index.php?func=detail&aid=28589&group_id=1040&atid=4097
=end
Updated by zenspider (Ryan Davis) about 14 years ago
- Status changed from Open to Closed
=begin
Thank you for your patch!
May ruby be with you.
=end