Sha256: 2190fa80572791e7e203eaa5f4404feec3d317546603a89353cdc27f053378a2

Contents?: true

Size: 648 Bytes

Versions: 3

Compression:

Stored size: 648 Bytes

Contents

require 'spec/helper'

spec_require 'erubis'
spec_require 'redcloth'

class TCTemplateRedClothController < Ramaze::Controller
  template_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

3 entries across 3 versions & 1 rubygems

Version Path
ramaze-0.3.5 spec/ramaze/template/redcloth.rb
ramaze-0.3.9 spec/ramaze/template/redcloth.rb
ramaze-0.3.9.1 spec/ramaze/template/redcloth.rb