mirror of
https://github.com/Shopify/liquid.git
synced 2026-09-19 02:40:41 -07:00
Refactor to create tags with a parse class method instead of new.
By moving parse out of the initializer, we can call super at the start of the initializers for subclasses, and avoid the nasty allocate hack.
This commit is contained in:
@@ -4,7 +4,7 @@ class StandardTagTest < Test::Unit::TestCase
|
||||
include Liquid
|
||||
|
||||
def test_tag
|
||||
tag = Tag.new('tag', [], [])
|
||||
tag = Tag.parse('tag', [], [], {})
|
||||
assert_equal 'liquid::tag', tag.name
|
||||
assert_equal '', tag.render(Context.new)
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user