Sha256: d0e897fb9c23ce94d9292842cb34760f15960144c434feffb4609fcd28426ed9
Contents?: true
Size: 922 Bytes
Versions: 1
Compression:
Stored size: 922 Bytes
Contents
# Copyright (c) 2006 Michael Fellinger m.fellinger@gmail.com # All files in this distribution are subject to the terms of the Ruby license. require 'spec/helper' testcase_requires 'ramaze/template/haml' class TCTemplateHamlController < Ramaze::Controller map :/ template_root __DIR__/:haml engine :Haml helper :link def index end def with_vars @title = "Teen Wolf" end end describe "Haml templates" do ramaze(:compile => true) it "should render" do get('/').body.strip.should == %{<div id='contact'> <h1>Eugene Mumbai</h1> <ul class='info'> <li class='login'>eugene</li> <li class='email'>eugene@example.com</li> </ul> </div>} end it "should have access to variables defined in controller" do get('/with_vars').body.strip.should == %{<div id='content'> <div class='title'> <h1>Teen Wolf</h1> <a href="/Home">Home</a> </div> </div>} end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
ramaze-0.2.0 | spec/ramaze/template/haml.rb |