Skip to content

Commit

Permalink
Move stuff in test around
Browse files Browse the repository at this point in the history
  • Loading branch information
Florian Weingarten committed Sep 11, 2013
1 parent 70513fc commit 01d352b
Showing 1 changed file with 21 additions and 21 deletions.
42 changes: 21 additions & 21 deletions test/liquid/tags/include_tag_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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

0 comments on commit 01d352b

Please sign in to comment.