Fix broken rendering of variables which are equal to false (closes #345)

This commit is contained in:
Florian Weingarten
2014-04-29 14:33:30 -04:00
parent f15d24509d
commit 2a12f253bf
3 changed files with 6 additions and 2 deletions
+4
View File
@@ -25,6 +25,10 @@ class VariableTest < Test::Unit::TestCase
assert_equal 'worked', template.render!('test' => {'test' => 'worked'})
end
def test_false_renders_as_false
assert_equal 'false', Template.parse("{{ foo }}").render!('foo' => false)
end
def test_preset_assigns
template = Template.parse(%|{{ test }}|)
template.assigns['test'] = 'worked'