ruby-changes:62455
From: David <ko1@a...>
Date: Fri, 31 Jul 2020 21:08:24 +0900 (JST)
Subject: [ruby-changes:62455] 14ab281faa (master): [rubygems/rubygems] Disallow warnings to creep into the test suite
https://git.ruby-lang.org/ruby.git/commit/?id=14ab281faa From 14ab281faa7f740afd41ce4b43b00edb73eff990 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Rodr=C3=ADguez?= <deivid.rodriguez@r...> Date: Wed, 8 Jul 2020 21:14:18 +0200 Subject: [rubygems/rubygems] Disallow warnings to creep into the test suite https://github.com/rubygems/rubygems/commit/694e6afee7 diff --git a/lib/rubygems/test_case.rb b/lib/rubygems/test_case.rb index 69f6e6d..a724976 100644 --- a/lib/rubygems/test_case.rb +++ b/lib/rubygems/test_case.rb @@ -289,6 +289,10 @@ class Gem::TestCase < Minitest::Test https://github.com/ruby/ruby/blob/trunk/lib/rubygems/test_case.rb#L289 # or <tt>i686-darwin8.10.1</tt> otherwise. def setup + @orig_stderr = $stderr.dup + @captured_stderr = Tempfile.new("captured_stderr") + $stderr.reopen @captured_stderr + @orig_env = ENV.to_hash @tmp = File.expand_path("tmp") @@ -462,6 +466,16 @@ class Gem::TestCase < Minitest::Test https://github.com/ruby/ruby/blob/trunk/lib/rubygems/test_case.rb#L466 end @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 def credential_setup -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/