diff --git a/test/liquid/tags/include_tag_test.rb b/test/liquid/tags/include_tag_test.rb index cd1249586..52970e1b0 100644 --- a/test/liquid/tags/include_tag_test.rb +++ b/test/liquid/tags/include_tag_test.rb @@ -48,6 +48,27 @@ def read_template_file(template_path, context) end end +class CustomInclude < Liquid::Tag + Syntax = /(#{Liquid::QuotedFragment}+)(\s+(?:with|for)\s+(#{Liquid::QuotedFragment}+))?/o + + def initialize(tag_name, markup, tokens) + markup =~ Syntax + @template_name = $1 + super + end + + def parse(tokens) + end + + def blank? + false + end + + def render(context) + @template_name[1..-2] + end +end + class IncludeTagTest < Test::Unit::TestCase include Liquid @@ -190,25 +211,4 @@ def test_custom_include_tag_within_if_statement Liquid::Template.tags['include'] = original_tag end end - - class CustomInclude < Liquid::Tag - Syntax = /(#{Liquid::QuotedFragment}+)(\s+(?:with|for)\s+(#{Liquid::QuotedFragment}+))?/o - - def initialize(tag_name, markup, tokens) - markup =~ Syntax - @template_name = $1 - super - end - - def parse(tokens) - end - - def blank? - false - end - - def render(context) - @template_name[1..-2] - end - end end # IncludeTagTest