Add test case for presetting assigns

This commit is contained in:
Brian Candler
2009-06-06 15:47:52 +01:00
parent ed1b542abf
commit 678fdfdb8a

View File

@@ -131,5 +131,11 @@ class VariableResolutionTest < Test::Unit::TestCase
template = Template.parse(%|{{ test.test }}|)
assert_equal 'worked', template.render('test' => {'test' => 'worked'})
end
def test_preset_assigns
template = Template.parse(%|{{ test }}|)
template.assigns['test'] = 'worked'
assert_equal 'worked', template.render
end
end