Add assert_syntax_error convenience method

This commit is contained in:
Dylan Thacker-Smith
2022-09-13 10:11:01 -04:00
parent d3647e280d
commit bca01e8944
+4
View File
@@ -56,6 +56,10 @@ module Minitest
assert_match(match, exception.message)
end
def assert_syntax_error(template, error_mode: nil)
assert_match_syntax_error("", template, error_mode: error_mode)
end
def assert_usage_increment(name, times: 1)
old_method = Liquid::Usage.method(:increment)
calls = 0