Sha256: c31774af77efb506d26dbdecf278bc5c95969307621025df946db252e5eb26f4

Contents?: true

Size: 644 Bytes

Versions: 8

Compression:

Stored size: 644 Bytes

Contents

require 'spec/helper'

spec_require 'erubis'
spec_require 'redcloth'

class TCTemplateRedClothController < Ramaze::Controller
  view_root __DIR__/:redcloth
  engine :RedCloth

  def index
    'RedCloth Index'
  end

  def external
    @num = 1
  end

  def internal
    "h2. <%= 1 + 1 %>"
  end
end

describe "RedCloth templates" do
  behaves_like 'http'
  ramaze(:mapping => {'/' => TCTemplateRedClothController})

  it "index" do
    get('/').body.should == '<p>RedCloth Index</p>'
  end

  it "external" do
    get('/external').body.should == '<h1>1</h1>'
  end

  it "internal" do
    get('/internal').body.should == "<h2>2</h2>"
  end
end

Version data entries

8 entries across 8 versions & 4 rubygems

Version Path
Pistos-ramaze-2008.09 spec/ramaze/template/redcloth.rb
clivecrous-ramaze-0.3.9.5 spec/ramaze/template/redcloth.rb
manveru-ramaze-2008.07 spec/ramaze/template/redcloth.rb
manveru-ramaze-2008.08 spec/ramaze/template/redcloth.rb
manveru-ramaze-2008.09 spec/ramaze/template/redcloth.rb
manveru-ramaze-2008.10 spec/ramaze/template/redcloth.rb
ramaze-2008.11 spec/ramaze/template/redcloth.rb
ramaze-2008.06 spec/ramaze/template/redcloth.rb