mirror of
https://github.com/Shopify/liquid.git
synced 2026-09-16 09:20:42 -07:00
Raise Liquid::ArgumentError on invalid range
This commit is contained in:
@@ -32,8 +32,7 @@ class ExpressionTest < Minitest::Test
|
||||
assert_equal(0..0, parse_and_eval("('a'..'b')"))
|
||||
|
||||
with_error_mode(:strict) do
|
||||
e = assert_raises(NoMethodError) { parse_and_eval("(1..(1..5))") }
|
||||
assert_match(/undefined method `to_i' for 1..5:Range/, e.message)
|
||||
assert_raises(Liquid::ArgumentError) { parse_and_eval("(1..(1..5))") }
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user