Merge pull request #592 from Shopify/method_literal

blank and empty as variable names
This commit is contained in:
Florian Weingarten
2015-06-04 19:09:48 +02:00
3 changed files with 31 additions and 8 deletions
+10
View File
@@ -24,6 +24,16 @@ class VariableTest < Minitest::Test
assert_equal '', template.render!
end
def test_using_blank_as_variable_name
template = Template.parse("{% assign foo = blank %}{{ foo }}")
assert_equal '', template.render!
end
def test_using_empty_as_variable_name
template = Template.parse("{% assign foo = empty %}{{ foo }}")
assert_equal '', template.render!
end
def test_hash_scoping
template = Template.parse(%({{ test.test }}))
assert_equal 'worked', template.render!('test' => { 'test' => 'worked' })