mirror of
https://github.com/Shopify/liquid.git
synced 2026-09-12 23:40:45 -07:00
Move stuff in test around
This commit is contained in:
@@ -48,6 +48,27 @@ class CountingFileSystem
|
|||||||
end
|
end
|
||||||
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
|
class IncludeTagTest < Test::Unit::TestCase
|
||||||
include Liquid
|
include Liquid
|
||||||
|
|
||||||
@@ -190,25 +211,4 @@ class IncludeTagTest < Test::Unit::TestCase
|
|||||||
Liquid::Template.tags['include'] = original_tag
|
Liquid::Template.tags['include'] = original_tag
|
||||||
end
|
end
|
||||||
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
|
end # IncludeTagTest
|
||||||
|
|||||||
Reference in New Issue
Block a user