Rename with_error_mode(...) to with_error_modes(...)

This commit is contained in:
Guilherme Carreiro
2025-10-27 16:33:31 +01:00
committed by Guilherme Carreiro
parent d63dd104de
commit 6aa4041c0f
12 changed files with 77 additions and 77 deletions
+10 -10
View File
@@ -213,12 +213,12 @@ class VariableTest < Minitest::Test
def test_filter_with_single_trailing_comma
template = '{{ "hello" | append: "world", }}'
with_error_mode(:strict) do
with_error_modes(:strict) do
error = assert_raises(Liquid::SyntaxError) { Template.parse(template) }
assert_match(/is not a valid expression/, error.message)
end
with_error_mode(:rigid) do
with_error_modes(:rigid) do
assert_template_result('helloworld', template)
end
end
@@ -226,12 +226,12 @@ class VariableTest < Minitest::Test
def test_multiple_filters_with_trailing_commas
template = '{{ "hello" | append: "1", | append: "2", }}'
with_error_mode(:strict) do
with_error_modes(:strict) do
error = assert_raises(Liquid::SyntaxError) { Template.parse(template) }
assert_match(/is not a valid expression/, error.message)
end
with_error_mode(:rigid) do
with_error_modes(:rigid) do
assert_template_result('hello12', template)
end
end
@@ -239,12 +239,12 @@ class VariableTest < Minitest::Test
def test_filter_with_colon_but_no_arguments
template = '{{ "test" | upcase: }}'
with_error_mode(:strict) do
with_error_modes(:strict) do
error = assert_raises(Liquid::SyntaxError) { Template.parse(template) }
assert_match(/is not a valid expression/, error.message)
end
with_error_mode(:rigid) do
with_error_modes(:rigid) do
assert_template_result('TEST', template)
end
end
@@ -252,12 +252,12 @@ class VariableTest < Minitest::Test
def test_filter_chain_with_colon_no_args
template = '{{ "test" | append: "x" | upcase: }}'
with_error_mode(:strict) do
with_error_modes(:strict) do
error = assert_raises(Liquid::SyntaxError) { Template.parse(template) }
assert_match(/is not a valid expression/, error.message)
end
with_error_mode(:rigid) do
with_error_modes(:rigid) do
assert_template_result('TESTX', template)
end
end
@@ -265,12 +265,12 @@ class VariableTest < Minitest::Test
def test_combining_trailing_comma_and_empty_args
template = '{{ "test" | append: "x", | upcase: }}'
with_error_mode(:strict) do
with_error_modes(:strict) do
error = assert_raises(Liquid::SyntaxError) { Template.parse(template) }
assert_match(/is not a valid expression/, error.message)
end
with_error_mode(:rigid) do
with_error_modes(:rigid) do
assert_template_result('TESTX', template)
end
end