aboutsummaryrefslogtreecommitdiffstats
path: root/test/rubygems/test_gem_specification.rb
diff options
context:
space:
mode:
authorHiroshi SHIBATA <hsbt@ruby-lang.org>2020-03-18 17:56:41 +0900
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2021-05-12 17:24:43 +0900
commit81d793a9216303f70143b13a88c924c22ce4af6d (patch)
tree04144885982d7fc6709d13d1569eff618e4462e9 /test/rubygems/test_gem_specification.rb
parent183174475c9cd51148f72668605390912339bcef (diff)
downloadruby-81d793a9216303f70143b13a88c924c22ce4af6d.tar.gz
[rubygems/rubygems] Extract assert_output to assert_empty and assert_equal with capture_output
https://github.com/rubygems/rubygems/commit/f6759440a4
Diffstat (limited to 'test/rubygems/test_gem_specification.rb')
-rw-r--r--test/rubygems/test_gem_specification.rb8
1 files changed, 6 insertions, 2 deletions
diff --git a/test/rubygems/test_gem_specification.rb b/test/rubygems/test_gem_specification.rb
index 42988ad086..d4656c0d30 100644
--- a/test/rubygems/test_gem_specification.rb
+++ b/test/rubygems/test_gem_specification.rb
@@ -3021,9 +3021,11 @@ WARN: Clearing out unresolved specs. Try 'gem cleanup <gem>'
Please report a bug if this causes problems.
EXPECTED
- assert_output nil, expected do
+ actual_stdout, actual_stderr = capture_output do
specification.reset
end
+ assert_empty actual_stdout
+ assert_equal(expected, actual_stderr)
end
def test_unresolved_specs_with_versions
@@ -3052,9 +3054,11 @@ WARN: Clearing out unresolved specs. Try 'gem cleanup <gem>'
Please report a bug if this causes problems.
EXPECTED
- assert_output nil, expected do
+ actual_stdout, actual_stderr = capture_output do
specification.reset
end
+ assert_empty actual_stdout
+ assert_equal(expected, actual_stderr)
end
def test_duplicate_runtime_dependency