mirror of
https://github.com/sinatra/sinatra
synced 2023-03-27 23:18:01 -04:00
Test for not_found, which was added recently for backward compatibility
This commit is contained in:
parent
4cddd70541
commit
3502741e89
1 changed files with 11 additions and 0 deletions
|
@ -100,6 +100,17 @@ describe 'Exception Mappings' do
|
|||
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
|
||||
|
|
Loading…
Add table
Reference in a new issue