mirror of
https://github.com/Shopify/liquid.git
synced 2026-09-19 10:52:48 -07:00
Reserve keyword arguments for new options in assert_template_result
This commit is contained in:
+3
-9
@@ -37,19 +37,13 @@ module Minitest
|
||||
module Assertions
|
||||
include Liquid
|
||||
|
||||
def assert_template_result(expected, template, assigns = {}, message = nil)
|
||||
def assert_template_result(expected, template, assigns = {}, message: nil)
|
||||
assert_equal(expected, Template.parse(template, line_numbers: true).render!(assigns), message)
|
||||
end
|
||||
|
||||
def assert_template_result_matches(expected, template, assigns = {}, message = nil)
|
||||
return assert_template_result(expected, template, assigns, message) unless expected.is_a?(Regexp)
|
||||
|
||||
assert_match(expected, Template.parse(template, line_numbers: true).render!(assigns), message)
|
||||
end
|
||||
|
||||
def assert_match_syntax_error(match, template, assigns = {})
|
||||
def assert_match_syntax_error(match, template)
|
||||
exception = assert_raises(Liquid::SyntaxError) do
|
||||
Template.parse(template, line_numbers: true).render(assigns)
|
||||
Template.parse(template, line_numbers: true).render
|
||||
end
|
||||
assert_match(match, exception.message)
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user