mirror of
https://github.com/Shopify/liquid.git
synced 2026-09-18 18:30:40 -07:00
Merge pull request #608 from Shopify/tag-tag_name
Add Liquid::Tag#tag_name
This commit is contained in:
+1
-1
@@ -1,7 +1,7 @@
|
|||||||
module Liquid
|
module Liquid
|
||||||
class Tag
|
class Tag
|
||||||
attr_accessor :options, :line_number
|
attr_accessor :options, :line_number
|
||||||
attr_reader :nodelist, :warnings
|
attr_reader :nodelist, :warnings, :tag_name
|
||||||
include ParserSwitching
|
include ParserSwitching
|
||||||
|
|
||||||
class << self
|
class << self
|
||||||
|
|||||||
@@ -13,4 +13,9 @@ class TagUnitTest < Minitest::Test
|
|||||||
tag = Tag.parse("long_tag", "param1, param2, param3", [], {})
|
tag = Tag.parse("long_tag", "param1, param2, param3", [], {})
|
||||||
assert_equal("long_tag param1, param2, param3", tag.raw)
|
assert_equal("long_tag param1, param2, param3", tag.raw)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def test_tag_name_should_return_name_of_the_tag
|
||||||
|
tag = Tag.parse("some_tag", [], [], {})
|
||||||
|
assert_equal 'some_tag', tag.tag_name
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user