summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorRyan Davis <ryand@zenspider.com>2020-02-08 15:14:16 -0800
committerRyan Davis <ryand@zenspider.com>2020-02-08 15:14:16 -0800
commitdd845b9d716ff80392b1dd593c54b64e232b8ce5 (patch)
tree982e27a379a97e1228b33af81c7084d86cd016a7 /test
parent408c71645f34ea8e9bb1239b935957100f50121b (diff)
downloadhoe-dd845b9d716ff80392b1dd593c54b64e232b8ce5.tar.gz
+ Added rdoc extension to the history and readme file finder globs.
+ Refactored intuit_values to take the file content as an arg. + Extended readme parsing to more intelligently deal with markup sections. [git-p4: depot-paths = "//src/hoe/dev/": change = 12535]
Diffstat (limited to 'test')
-rw-r--r--test/test_hoe.rb43
1 files changed, 43 insertions, 0 deletions
diff --git a/test/test_hoe.rb b/test/test_hoe.rb
index 60b9522..a39d479 100644
--- a/test/test_hoe.rb
+++ b/test/test_hoe.rb
@@ -217,6 +217,49 @@ class TestHoe < Minitest::Test
assert_equal exp, hoe.parse_urls(hash)
end
+ def test_parse_mrww
+ h = nil
+ mrww_readme = <<~EOM
+ = make
+ = rake
+ = work
+ = well
+
+ home :: https://github.com/seattlerb/makerakeworkwell
+ rdoc :: http://docs.seattlerb.org/makerakeworkwell
+
+ == DESCRIPTION:
+
+ make/rake/work/well provides two simple modifications to rake that
+ make working with file tasks cleaner, easier, and faster.
+ EOM
+
+
+
+ assert_silent do
+ h = Hoe.spec "blah" do
+ developer "author", "email"
+ license "MIT"
+ self.version = "1.0"
+ self.readme_file = nil
+ self.history_file = nil
+ self.changes = true
+
+ self.intuit_values mrww_readme
+ end
+ end
+
+ desc = mrww_readme.lines[10..11].join.chomp
+ urls = {
+ "home" => "https://github.com/seattlerb/makerakeworkwell",
+ "rdoc" => "http://docs.seattlerb.org/makerakeworkwell"
+ }
+
+ assert_equal desc, h.description
+ assert_equal desc, h.summary
+ assert_equal urls, h.urls
+ end
+
def test_metadata
hash = [
"home :: https://github.com/seattlerb/hoe",