add failing test

This commit is contained in:
fen 2016-11-02 00:00:38 +01:00
parent 7729d12cdc
commit 1bb2259a10
1 changed files with 21 additions and 0 deletions

View File

@ -80,5 +80,26 @@ class TestURL < JekyllUnitTest
url.to_s
end
end
should "ignore NoMethodErrors when a placeholder is not found" do
site = fixture_site({
"collections" => {
"methods" => {
"output" => true
}
}
})
site.read
matching_doc = site.collections["methods"].docs.find do |doc|
doc.relative_path == "_methods/escape-+ #%20[].md"
end
out, err = capture_io do
URL.new(
:template => "/methods/:title/:headline",
:placeholders => matching_doc.url_placeholders
).to_s
end
assert out.include? ":headline is not defined!"
end
end
end