Cycle tags are never blank

This commit is contained in:
Florian Weingarten
2013-06-27 14:00:38 +02:00
parent c16697746b
commit b4fbcea114
2 changed files with 9 additions and 1 deletions

View File

@@ -43,7 +43,11 @@ module Liquid
result
end
end
def blank?
false
end
private
def variables_from_string(markup)

View File

@@ -65,6 +65,10 @@ class BlankTest < Test::Unit::TestCase
assert_template_result(" 0"*2*(N+1), wrap("{% assign foo = 0 %} {% increment foo %} {% decrement foo %}"))
end
def test_cycle_is_not_blank
assert_template_result("12"*((N+1)/2)+"1", wrap("{% cycle '1', '2' %}"))
end
def test_raw_is_not_blank
assert_template_result(" "*(N+1), wrap(" {% raw %} {% endraw %}"))
end