Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 835d90f7ed
Fetching contributors…

Cannot retrieve contributors at this time

file 32 lines (28 sloc) 0.672 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
begin
  require_relative 'spec_helper'
rescue NameError
  require File.expand_path('../spec_helper', __FILE__)
end

describe Sinatra::Glorify do

  it "should parse a header" do
    mock_app do
      get('/') { erb :header }
    end
    expected = "<h1>a sip of glory</h1>"
    get('/')
    assert last_response.ok?
    assert_equal expected, body
  end

  it "should parse code blocks" do
    mock_app do
      get('/') { erb :blocks }
    end
    expected = "<p><code>puts &quot;Hello, world!&quot;</code></p>"
    get('/')
    assert last_response.ok?
    assert_equal expected, body
  end

  it "should parse ruby blocks" do
    flunk "NotImplementedError"
  end
end
Something went wrong with that request. Please try again.