Assert raising Psych::SyntaxError when `"strict_front_matter"=>true` (#6520)

Merge pull request 6520
This commit is contained in:
ashmaroli 2017-11-06 09:20:46 +05:30 committed by jekyllbot
parent db2fc380a0
commit 0205fb9e79
3 changed files with 3 additions and 3 deletions

View File

@ -266,7 +266,7 @@ module Jekyll
merge_defaults
read_content(opts)
read_post_data
rescue StandardError => e
rescue SyntaxError, StandardError, Errors::FatalException => e
handle_read_error(e)
end
end

View File

@ -38,7 +38,7 @@ class TestConvertible < JekyllUnitTest
should "raise for broken front matter with `strict_front_matter` set" do
name = "broken_front_matter2.erb"
@convertible.site.config["strict_front_matter"] = true
assert_raises do
assert_raises(Psych::SyntaxError) do
@convertible.read_yaml(@base, name)
end
end

View File

@ -308,7 +308,7 @@ class TestSite < JekyllUnitTest
"collections" => ["broken"],
"strict_front_matter" => true
))
assert_raises do
assert_raises(Psych::SyntaxError) do
site.process
end
end