# 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_requires 'erubis', 'redcloth' Ramaze::App.options.views = 'redcloth' class SpecRedCloth < Ramaze::Controller map '/' engine :RedCloth def index 'h1. RedCloth Index' end def links ''.ui end def internal "h2. <%= 1 + 1 %>" end end describe "Ramaze::View::RedCloth" do behaves_like :mock should 'render' do got = get('/') got.status.should == 200 got['Content-Type'].should == 'text/html' got.body.should == '

RedCloth Index

' end it "uses helper methods" do got = get('/links') got.status.should == 200 got['Content-Type'].should == 'text/html' got.body.strip.should == '' end it 'renders external templates' do got = get('/external') got.status.should == 200 got['Content-Type'].should == 'text/html' got.body.strip.should == " Erubis Test

RedCloth Template

" end end