Add strict_variables/strict_filters render options to check for undefined variables and filters

This commit is contained in:
Ivan Kuznetsov
2016-02-03 10:49:33 +07:00
parent 08de6ed2c5
commit dadd9b4dd2
10 changed files with 139 additions and 12 deletions
+10
View File
@@ -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