From 678fdfdb8a314885db624c64476d70cb4c43490a Mon Sep 17 00:00:00 2001 From: Brian Candler Date: Sat, 6 Jun 2009 15:47:52 +0100 Subject: [PATCH] Add test case for presetting assigns --- test/variable_test.rb | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/test/variable_test.rb b/test/variable_test.rb index 058383a..bc4d41a 100644 --- a/test/variable_test.rb +++ b/test/variable_test.rb @@ -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 \ No newline at end of file