summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorRyan Davis <ryand@zenspider.com>2019-10-28 15:01:57 -0800
committerRyan Davis <ryand@zenspider.com>2019-10-28 15:01:57 -0800
commite23f9803aefb2e283ba8211235d309ff94b55e9a (patch)
tree820e43d34f5aa7c6315f103775beeadfb93feda0 /test
parent24ceac6b665f481da32681d1d89d279fe957d499 (diff)
downloadhoe-e23f9803aefb2e283ba8211235d309ff94b55e9a.tar.gz
+ Added deprecation to parse_urls for ancient url array form.
+ Hoe#parse_urls now returns a hash no matter what minor cleanup to new metadata code minor cleanup to tests. damn... they're _old_. [git-p4: depot-paths = "//src/hoe/dev/": change = 12370]
Diffstat (limited to 'test')
-rw-r--r--test/test_hoe.rb34
1 files changed, 12 insertions, 22 deletions
diff --git a/test/test_hoe.rb b/test/test_hoe.rb
index 229f39a..8afeccb 100644
--- a/test/test_hoe.rb
+++ b/test/test_hoe.rb
@@ -146,14 +146,9 @@ class TestHoe < Minitest::Test
def test_initialize_intuit
Dir.mktmpdir do |path|
Dir.chdir path do
- open "Manifest.txt", "w" do |io| # sorted
- io.puts "FAQ.rdoc"
- io.puts "History.rdoc"
- io.puts "README.rdoc"
- end
-
- open "README.rdoc", "w" do |io| io.puts "= blah" end
- open "History.rdoc", "w" do |io| io.puts "=== 1.0" end
+ File.write "Manifest.txt", "FAQ.rdoc\nHistory.rdoc\nREADME.rdoc\n"
+ File.write "README.rdoc", "= blah\n\nhome :: http://blah/"
+ File.write "History.rdoc", "=== 1.0"
assert_equal "History.rdoc", hoe.history_file
assert_equal "README.rdoc", hoe.readme_file
@@ -166,15 +161,10 @@ class TestHoe < Minitest::Test
def test_initialize_intuit_ambiguous
Dir.mktmpdir do |path|
Dir.chdir path do
- open "Manifest.txt", "w" do |io|
- io.puts "History.rdoc" # sorted
- io.puts "README.ja.rdoc"
- io.puts "README.rdoc"
- end
-
- open "README.rdoc", "w" do |io| io.puts "= blah" end
- open "README.ja.rdoc", "w" do |io| io.puts "= blah" end
- open "History.rdoc", "w" do |io| io.puts "=== 1.0" end
+ File.write "Manifest.txt", "History.rdoc\nREADME.ja.rdoc\nREADME.rdoc\n"
+ File.write "README.rdoc", "= blah\n\nhome :: http://blah/"
+ File.write "README.ja.rdoc", "= blah\n\nhome :: http://blah/"
+ File.write "History.rdoc", "=== 1.0"
assert_equal "README.ja.rdoc", hoe(:skip_files).readme_file
end
@@ -201,12 +191,12 @@ class TestHoe < Minitest::Test
"* http://docs.seattlerb.org/hoe/Hoe.pdf",
"* http://github.com/jbarnette/hoe-plugin-examples"].join "\n"
- exp = ["https://github.com/seattlerb/hoe",
- "http://docs.seattlerb.org/hoe/",
- "http://docs.seattlerb.org/hoe/Hoe.pdf",
- "http://github.com/jbarnette/hoe-plugin-examples"]
+ exp = { "home" => "https://github.com/seattlerb/hoe" }
+ err = /DEPRECATED: Please switch readme to hash format/
- assert_equal exp, hoe.parse_urls(ary)
+ assert_output "", err do
+ assert_equal exp, hoe.parse_urls(ary)
+ end
end
def test_parse_urls_hash