Sha256: f7db7ca1d90158323e4ba13dc31448f448c0a1ca17f9179b4fdaa9e78f46889a

Contents?: true

Size: 917 Bytes

Versions: 1

Compression:

Stored size: 917 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 'sass/engine'

class TCTemplateSassController < Ramaze::Controller
  map '/'
  template_root 'spec/ramaze/template/sass/'
  engine :Sass

  define_method('style.css') do
%{
body
  :margin 1em

  #content
    :text-align center
}
  end
end

describe "Sass templates" do
  ramaze(:compile => true)

  it "should render inline" do
    r = get('/style.css')
    r.headers['Content-Type'].should == "text/css"
    r.body.strip.should ==
"body {
  margin: 1em; }
  body #content {
    text-align: center; }"
  end

  it "should render from file" do
    r = get('/file.css')
    r.headers['Content-Type'].should == "text/css"
    r.body.strip.should ==
"body {
  margin: 1em; }
  body #content {
    text-align: center; }"
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
ramaze-0.2.0 spec/ramaze/template/sass.rb