Project

General

Profile

Actions

Bug #3858

closed

test_capture_io (test/minitest/test_mini_test.rb:837) doesn't pass

Added by sorah (Sorah Fukumori) over 14 years ago. Updated over 13 years ago.

Status:
Closed
Target version:
-
ruby -v:
ruby 1.9.3dev (2010-09-22 trunk 29314) [x86_64-darwin10.4.0]
Backport:
[ruby-core:32499]

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


Related issues 1 (0 open1 closed)

Related to Ruby master - Bug #3856: test_capture_io (test/minitest/test_mini_test.rb:837)が通らないClosed09/22/2010Actions
Actions #2

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

Actions

Also available in: Atom PDF

Like0
Like0Like0