add test for locals passed to haml

This commit is contained in:
Konstantin Haase 2010-12-16 22:57:24 +01:00
parent f5b7e8859a
commit 7e80e3752e
1 changed files with 5 additions and 0 deletions

View File

@ -89,6 +89,11 @@ class HAMLTest < Test::Unit::TestCase
assert ok?
assert_match(/^<!DOCTYPE html PUBLIC (.*) HTML 4.01/, body)
end
it "is possible to pass locals" do
haml_app { haml "= foo", :locals => { :foo => 'bar' }}
assert_equal "bar\n", body
end
end
rescue
warn "#{$!.to_s}: skipping haml tests"