Regression test for change of blank? default behaviour (2efe809e11)

This commit is contained in:
Florian Weingarten
2013-09-23 09:38:45 -04:00
parent 2efe809e11
commit 81d3733f57

View File

@@ -1,5 +1,13 @@
require 'test_helper'
class FoobarTag < Liquid::Tag
def render(*args)
" "
end
Liquid::Template.register_tag('foobar', FoobarTag)
end
class BlankTestFileSystem
def read_template_file(template_path, context)
template_path
@@ -22,6 +30,10 @@ class BlankTest < Test::Unit::TestCase
wrap_in_for(body) + wrap_in_if(body)
end
def test_new_tags_are_not_blank_by_default
assert_template_result(" "*N, wrap_in_for("{% foobar %}"))
end
def test_loops_are_blank
assert_template_result("", wrap_in_for(" "))
end