Create a BlockBody class to decouple block body parsing from tags.

This commit is contained in:
Dylan Thacker-Smith
2014-11-03 17:07:42 -05:00
committed by Justin Li
parent 263e90e772
commit 73fcd42403
18 changed files with 253 additions and 157 deletions
+19
View File
@@ -0,0 +1,19 @@
require 'test_helper'
class DocumentTest < Minitest::Test
include Liquid
def test_unexpected_outer_tag
exc = assert_raises(SyntaxError) do
Template.parse("{% else %}")
end
assert_equal exc.message, "Liquid syntax error: Unexpected outer 'else' tag"
end
def test_unknown_tag
exc = assert_raises(SyntaxError) do
Template.parse("{% foo %}")
end
assert_equal exc.message, "Liquid syntax error: Unknown tag 'foo'"
end
end