mirror of
https://github.com/Shopify/liquid.git
synced 2026-09-16 17:30:43 -07:00
Add strict_variables/strict_filters render options to check for undefined variables and filters
This commit is contained in:
@@ -77,4 +77,14 @@ class StrainerUnitTest < Minitest::Test
|
||||
assert_kind_of b, strainer
|
||||
assert_kind_of Liquid::StandardFilters, strainer
|
||||
end
|
||||
|
||||
def test_add_filter_when_wrong_filter_class
|
||||
c = Context.new
|
||||
s = c.strainer
|
||||
wrong_filter = ->(v) { v.reverse }
|
||||
|
||||
assert_raises ArgumentError do
|
||||
s.class.add_filter(wrong_filter)
|
||||
end
|
||||
end
|
||||
end # StrainerTest
|
||||
|
||||
Reference in New Issue
Block a user