Sha256: 2b63b7b1b7735050e0f4e89704bf74544354aa3cab4158b00ed9d9c8ad8b7bfb
Contents?: true
Size: 945 Bytes
Versions: 1
Compression:
Stored size: 945 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 template_root 'spec/ramaze/template/haml/' trait :engine => Ramaze::Template::Haml helper :link def index end def with_vars @title = "Teen Wolf" end end describe "Simply calling" do ramaze(:mapping => {'/' => TCTemplateHamlController}) it "index" 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 "variables 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.1.1 | spec/ramaze/template/haml.rb |