render_to_output_buffer

This commit is contained in:
Florian Weingarten
2019-04-23 17:06:29 -04:00
parent 2a1ca3152d
commit 9640e77805
30 changed files with 184 additions and 88 deletions
+4 -4
View File
@@ -1,12 +1,10 @@
require 'test_helper'
class FoobarTag < Liquid::Tag
def render(context, output = '')
def render_to_output_buffer(context, output)
output << ' '
output
end
Liquid::Template.register_tag('foobar', FoobarTag)
end
class BlankTestFileSystem
@@ -32,7 +30,9 @@ class BlankTest < Minitest::Test
end
def test_new_tags_are_not_blank_by_default
assert_template_result(" " * N, wrap_in_for("{% foobar %}"))
with_custom_tag('foobar', FoobarTag) do
assert_template_result(" " * N, wrap_in_for("{% foobar %}"))
end
end
def test_loops_are_blank