mirror of
https://github.com/Shopify/liquid.git
synced 2026-10-03 17:15:12 -07:00
Add error_mode option to assert_match_syntax_error
This commit is contained in:
+2
-2
@@ -49,9 +49,9 @@ module Minitest
|
|||||||
assert_equal(expected, output, message)
|
assert_equal(expected, output, message)
|
||||||
end
|
end
|
||||||
|
|
||||||
def assert_match_syntax_error(match, template)
|
def assert_match_syntax_error(match, template, error_mode: nil)
|
||||||
exception = assert_raises(Liquid::SyntaxError) do
|
exception = assert_raises(Liquid::SyntaxError) do
|
||||||
Template.parse(template, line_numbers: true).render
|
Template.parse(template, line_numbers: true, error_mode: error_mode&.to_sym).render
|
||||||
end
|
end
|
||||||
assert_match(match, exception.message)
|
assert_match(match, exception.message)
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user