summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorHiroshi SHIBATA <hsbt@ruby-lang.org>2023-04-19 18:27:31 +0900
committergit <svn-admin@ruby-lang.org>2023-04-20 01:57:16 +0000
commitdbcdac00e6b9b9b72c0679e54d2ecef02a9cf3bc (patch)
tree212628cb1cdf33792195a1c85af731f8c1202b66 /test
parent5579cbe2dd6fda86d2c31c9c0a6ee4697fc31e26 (diff)
downloadruby-dbcdac00e6b9b9b72c0679e54d2ecef02a9cf3bc.tar.gz
[rubygems/rubygems] Revert "Bundler::YAMLSerializer.load couldn't raise error when invalid yaml was provided"
This reverts commit https://github.com/rubygems/rubygems/commit/cfcfde04c783. https://github.com/rubygems/rubygems/commit/ac21ae7083
Diffstat (limited to 'test')
-rw-r--r--test/rubygems/test_gem_config_file.rb15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/rubygems/test_gem_config_file.rb b/test/rubygems/test_gem_config_file.rb
index 28651d2e9a..d15a0fb793 100644
--- a/test/rubygems/test_gem_config_file.rb
+++ b/test/rubygems/test_gem_config_file.rb
@@ -465,6 +465,21 @@ if you believe they were disclosed to a third party.
assert_equal %w[http://even-more-gems.example.com], Gem.sources
end
+ def test_ignore_invalid_config_file
+ File.open @temp_conf, "w" do |fp|
+ fp.puts "invalid: yaml:"
+ end
+
+ begin
+ verbose = $VERBOSE
+ $VERBOSE = nil
+
+ util_config_file
+ ensure
+ $VERBOSE = verbose
+ end
+ end
+
def test_load_ssl_verify_mode_from_config
File.open @temp_conf, "w" do |fp|
fp.puts ":ssl_verify_mode: 1"