Skip to content

Commit

Permalink
Test for not_found, which was added recently for backward compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
cypher authored and rtomayko committed Jan 13, 2009
1 parent 4cddd70 commit 3502741
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions test/mapped_error_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,17 @@ class FooNotFound < Sinatra::NotFound
body.should.equal 'foo! not found.'
end

it 'has a not_found method for backwards compatibility' do
mock_app {
not_found do
"Lost, are we?"
end
}

get '/test'
status.should.equal 404
body.should.equal "Lost, are we?"
end
end

describe 'Custom Error Pages' do
Expand Down

0 comments on commit 3502741

Please sign in to comment.