test/test_hoe.rb in hoe-3.22.0 vs test/test_hoe.rb in hoe-3.22.1

- old
+ new

@@ -1,5 +1,6 @@ +# coding: utf-8 require "minitest/autorun" require "hoe" require "tempfile" class Hoe @@ -256,9 +257,45 @@ } assert_equal desc, h.description assert_equal desc, h.summary assert_equal urls, h.urls + end + + def test_intuit_values_should_be_silent_if_urls_are_already_set + h = nil + nokogiri_readme = <<~EOM + ## Links + + * https://nokogiri.org + * [Installation Help](https://nokogiri.org/tutorials/installing_nokogiri.html) + * [Tutorials](https://nokogiri.org/tutorials/toc.html) + * [Cheat Sheet](https://github.com/sparklemotion/nokogiri/wiki/Cheat-sheet) + * [GitHub](https://github.com/sparklemotion/nokogiri) + * [Mailing List](https://groups.google.com/group/nokogiri-talk) + * [Chat/Gitter](https://gitter.im/sparklemotion/nokogiri) + + EOM + + exp = { + "home" => "https://nokogiri.org", + "bugs" => "https://github.com/sparklemotion/nokogiri/issues", + "doco" => "https://nokogiri.org/rdoc/index.html", + "clog" => "https://nokogiri.org/CHANGELOG.html", + "code" => "https://github.com/sparklemotion/nokogiri", + } + + assert_silent do + h = Hoe.spec "blah" do + developer "author", "email" + license "MIT" + + self.urls = exp + self.intuit_values nokogiri_readme + end + end + + assert_equal exp, h.urls end def test_metadata hash = [ "home :: https://github.com/seattlerb/hoe",