The if tag now raises Liquid::SyntaxError rather than a generic RuntimeError for syntax problems.

This commit is contained in:
Nathaniel Bibler
2008-05-21 23:58:12 -04:00
parent ed75a6d948
commit 4c30922d8e
2 changed files with 6 additions and 2 deletions
+4
View File
@@ -116,6 +116,10 @@ class IfElseTest < Test::Unit::TestCase
assert_raise(SyntaxError){ assert_template_result('', '{% if jerry == 1 %}')}
end
def test_syntax_error_no_expression
assert_raise(SyntaxError) { assert_template_result('', '{% if %}') }
end
def test_if_with_custom_condition
Condition.operators['contains'] = :[]