Sha256: e33a1226dbd3981721803ddbf96ca810ca5f7893255d05245ede1d5d2096dac9
Contents?: true
Size: 1.18 KB
Versions: 4
Compression:
Stored size: 1.18 KB
Contents
require File.expand_path('../../../../spec/helper', __FILE__) spec_require 'slim' Ramaze::App.options.views = 'slim' class SpecSlim < Ramaze::Controller map '/' engine :slim def index @value = 'foo' return 'h1 Slim index with #{@value}' end def external_vars @name = 'Slim' end end # SpecSlim describe 'Ramaze::View::Slim' do behaves_like :rack_test should 'render an inline template' do got = get('/') got.body.should == '<h1>Slim index with foo</h1>' got.status.should == 200 got['Content-Type'].should == 'text/html' end should 'render an external template' do got = get('/external') got.status.should == 200 got['Content-Type'].should == 'text/html' got.body.should == '<html><head><title>Slim Template</title></head>' \ '<body><p>External Slim template</p></body></html>' end should 'render an external template with variables' do got = get('/external') got.status.should == 200 got['Content-Type'].should == 'text/html' got.body.should == '<html><head><title>Slim Template</title></head>' \ '<body><p>External Slim template</p></body></html>' end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
ramaze-2012.12.08 | spec/ramaze/view/slim.rb |
ramaze-2012.12.08b | spec/ramaze/view/slim.rb |
ramaze-2012.04.14 | spec/ramaze/view/slim.rb |
ramaze-2012.03.07 | spec/ramaze/view/slim.rb |