# Copyright (c) 2009 Michael Fellinger m.fellinger@gmail.com # All files in this distribution are subject to the terms of the Ruby license. require 'spec/helper' spec_require 'haml' Ramaze::App.options.views = 'haml' class SpecHaml < Ramaze::Controller map '/' engine :Haml def index '%h1 Haml Index' end def links ' %ul %li %a{:href => r(:index)} Index page %li %a{:href => r(:internal)} Internal template %li %a{:href => r(:external)} External template '.ui end def sum(num1, num2) @num1, @num2 = num1.to_i, num2.to_i end end describe Ramaze::View::Haml do behaves_like :mock should 'render' do got = get('/') got.status.should == 200 got['Content-Type'].should == 'text/html' got.body.strip.should == "