summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHiroshi SHIBATA <hsbt@ruby-lang.org>2024-01-24 10:51:21 +0900
committergit <svn-admin@ruby-lang.org>2024-01-24 09:11:55 +0000
commitfb39128dce7babcb1b8c6d92bfa9e85eb7f7118e (patch)
tree01ece988a8a63731386eddf57a6af0cdb1f3065a
parent6191f4a1697f2ac4288181f32257f95273ecfbb7 (diff)
[rubygems/rubygems] Added test for rubygems
https://github.com/rubygems/rubygems/commit/64405147c9
-rw-r--r--test/rubygems/test_gem_config_file.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/rubygems/test_gem_config_file.rb b/test/rubygems/test_gem_config_file.rb
index ad120d2aaa..ae6739db98 100644
--- a/test/rubygems/test_gem_config_file.rb
+++ b/test/rubygems/test_gem_config_file.rb
@@ -548,4 +548,14 @@ if you believe they were disclosed to a third party.
assert_equal("---\n:foo: \"bar\"\n", actual)
end
+
+ def test_handle_comment
+ yaml = <<~YAML
+ ---
+ :foo: bar # buzz
+ YAML
+
+ actual = Gem::ConfigFile.load_with_rubygems_config_hash(yaml)
+ assert_equal("bar", actual[:foo])
+ end
end