Sha256: d81ea8a32b065a8c3c311e607f565df926c967fdc55534d01f00f01c5e9eb15a

Contents?: true

Size: 606 Bytes

Versions: 8

Compression:

Stored size: 606 Bytes

Contents

require File.expand_path( File.join( File.dirname(__FILE__), "..", "spec_helper.rb" ) )
require 'stickler/middleware/not_found'

describe ::Stickler::Middleware::NotFound do
  include Rack::Test::Methods
  def app
    ::Stickler::Middleware::NotFound.new
  end

  before do
    get "/"
  end

  it "should respond to a 404 on everything"  do
    get '/'
    last_response.status.should == 404
  end

  it "should return a 'text/html' page" do
    last_response.content_type.should == 'text/html'
  end

  it "should say to go look somewhere else" do
    last_response.body.should =~ /Not Found/m
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
stickler-2.2.4 spec/middleware/not_found_spec.rb
stickler-2.2.3 spec/middleware/not_found_spec.rb
stickler-2.2.2 spec/middleware/not_found_spec.rb
stickler-2.1.4 spec/middleware/not_found_spec.rb
stickler-2.1.3 spec/middleware/not_found_spec.rb
stickler-2.1.2 spec/middleware/not_found_spec.rb
stickler-2.1.1 spec/middleware/not_found_spec.rb
stickler-2.1.0 spec/middleware/not_found_spec.rb