mirror of
https://github.com/jekyll/jekyll.git
synced 2026-04-28 03:01:03 -04:00
creating a Site with an invalid Markdown processor fails sooner and gives a better error message
Signed-off-by: Nick Quaranto <nick@quaran.to>
This commit is contained in:
committed by
Nick Quaranto
parent
e0ceee2e89
commit
5468548948
@@ -65,5 +65,21 @@ class TestSite < Test::Unit::TestCase
|
||||
@site.exclude = excludes
|
||||
assert_equal includes, @site.filter_entries(excludes + includes)
|
||||
end
|
||||
|
||||
context 'with an invalid markdown processor in the configuration' do
|
||||
|
||||
should 'give a meaningful error message' do
|
||||
bad_processor = 'not a processor name'
|
||||
begin
|
||||
Site.new(Jekyll.configuration.merge({ 'markdown' => bad_processor }))
|
||||
flunk 'Invalid markdown processors should cause a failure on site creation'
|
||||
rescue RuntimeError => e
|
||||
assert e.to_s =~ /invalid|bad/i
|
||||
assert e.to_s =~ %r{#{bad_processor}}
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user