From 2c51a1922ae82250f368de06980dff444ac61deb Mon Sep 17 00:00:00 2001 From: Dylan Thacker-Smith Date: Tue, 6 Sep 2022 16:43:01 -0400 Subject: [PATCH] Add error_mode option to assert_match_syntax_error --- test/test_helper.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/test_helper.rb b/test/test_helper.rb index aee4d84e..de2d534e 100755 --- a/test/test_helper.rb +++ b/test/test_helper.rb @@ -49,9 +49,9 @@ module Minitest assert_equal(expected, output, message) end - def assert_match_syntax_error(match, template) + def assert_match_syntax_error(match, template, error_mode: nil) 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 assert_match(match, exception.message) end