From 018261eb921d51001c91a636e808349dfa725494 Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA Date: Fri, 10 Mar 2023 13:28:10 +0900 Subject: [PATCH] [rubygems/rubygems] Added small tests https://github.com/rubygems/rubygems/commit/08a245bdf8 --- test/rubygems/test_gem_config_file.rb | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/test/rubygems/test_gem_config_file.rb b/test/rubygems/test_gem_config_file.rb index ae6739db98..128b0ec841 100644 --- a/test/rubygems/test_gem_config_file.rb +++ b/test/rubygems/test_gem_config_file.rb @@ -58,6 +58,7 @@ class TestGemConfigFile < Gem::TestCase fp.puts ":ssl_verify_mode: 0" fp.puts ":ssl_ca_cert: /etc/ssl/certs" fp.puts ":cert_expiration_length_days: 28" + fp.puts ":install_extension_in_lib: true" fp.puts ":ipv4_fallback_enabled: true" end @@ -73,6 +74,7 @@ class TestGemConfigFile < Gem::TestCase assert_equal 0, @cfg.ssl_verify_mode assert_equal "/etc/ssl/certs", @cfg.ssl_ca_cert assert_equal 28, @cfg.cert_expiration_length_days + assert_equal true, @cfg.install_extension_in_lib assert_equal true, @cfg.ipv4_fallback_enabled end @@ -509,6 +511,14 @@ if you believe they were disclosed to a third party. assert_equal("/home/me/mine.pem", @cfg.ssl_client_cert) end + def test_load_install_extension_in_lib_from_config + File.open @temp_conf, "w" do |fp| + fp.puts ":install_extension_in_lib: false" + end + util_config_file + assert_equal(false, @cfg.install_extension_in_lib) + end + def util_config_file(args = @cfg_args) @cfg = Gem::ConfigFile.new args end