Skip to content

Commit

Permalink
Issue 1548: Expected to see parent handler invoked.
Browse files Browse the repository at this point in the history
  • Loading branch information
carlwiedemann committed Mar 29, 2023
1 parent fb76534 commit 70151c9
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions test/mapped_error_test.rb
Expand Up @@ -115,6 +115,18 @@ def test_default
end
get '/'
assert_equal 500, status
assert_equal "she's there.", body
end

it "uses the Exception handler before raising errors even when raise_errors is set" do
mock_app do
set :raise_errors, true
error(Exception) { "Parent handler" }
get('/') { raise FooError }
end
get '/'
assert_equal 500, status
assert_equal "Parent handler", body
end

it "never raises Sinatra::NotFound beyond the application" do
Expand Down

0 comments on commit 70151c9

Please sign in to comment.