mirror of
https://github.com/kemko/liquid.git
synced 2026-01-06 10:15:40 +03:00
Regression test for change of blank? default behaviour (2efe809e11)
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user