Sha256: 6e7b56bca1ed936d4c0be4476d5bcfbaf04231f6776f63507c849201ca5edb55

Contents?: true

Size: 926 Bytes

Versions: 2

Compression:

Stored size: 926 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 '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(:compile => true)

  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

2 entries across 2 versions & 1 rubygems

Version Path
ramaze-0.1.2 spec/ramaze/template/haml.rb
ramaze-0.1.3 spec/ramaze/template/haml.rb