Skip to content

Commit

Permalink
Render from file.
Browse files Browse the repository at this point in the history
  • Loading branch information
Francesc Esplugas authored and defunkt committed Oct 7, 2009
1 parent debca50 commit 186ca16
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions test/mustache_test.rb
Expand Up @@ -129,4 +129,18 @@ def test_render_with_params
assert_equal 'Hello World!', Mustache.render('Hello {{planet}}!', :planet => 'World')
end

def test_render_from_file
expected = <<-data
<VirtualHost *>
ServerName example.com
DocumentRoot /var/www/example.com
RailsEnv production
</VirtualHost>
data
template = File.read("examples/passenger.conf")
assert_equal expected, Mustache.render(template, :stage => 'production',
:server => 'example.com',
:deploy_to => '/var/www/example.com' )
end

end

0 comments on commit 186ca16

Please sign in to comment.