[rubygems/rubygems] Disallow warnings to creep into the test suite
https://github.com/rubygems/rubygems/commit/694e6afee7
This commit is contained in:
parent
9d6123da15
commit
14ab281faa
Notes:
git
2020-07-31 21:08:24 +09:00
@ -289,6 +289,10 @@ class Gem::TestCase < Minitest::Test
|
|||||||
# or <tt>i686-darwin8.10.1</tt> otherwise.
|
# or <tt>i686-darwin8.10.1</tt> otherwise.
|
||||||
|
|
||||||
def setup
|
def setup
|
||||||
|
@orig_stderr = $stderr.dup
|
||||||
|
@captured_stderr = Tempfile.new("captured_stderr")
|
||||||
|
$stderr.reopen @captured_stderr
|
||||||
|
|
||||||
@orig_env = ENV.to_hash
|
@orig_env = ENV.to_hash
|
||||||
@tmp = File.expand_path("tmp")
|
@tmp = File.expand_path("tmp")
|
||||||
|
|
||||||
@ -462,6 +466,16 @@ class Gem::TestCase < Minitest::Test
|
|||||||
end
|
end
|
||||||
|
|
||||||
@back_ui.close
|
@back_ui.close
|
||||||
|
|
||||||
|
$stderr.rewind
|
||||||
|
err = @captured_stderr.read
|
||||||
|
assert_empty err
|
||||||
|
ensure
|
||||||
|
@captured_stderr.unlink
|
||||||
|
|
||||||
|
$stderr.reopen @orig_stderr
|
||||||
|
@orig_stderr.close
|
||||||
|
@captured_stderr.close
|
||||||
end
|
end
|
||||||
|
|
||||||
def credential_setup
|
def credential_setup
|
||||||
|
Loading…
x
Reference in New Issue
Block a user