Skip to content

Commit

Permalink
Removed exception route
Browse files Browse the repository at this point in the history
  • Loading branch information
Tammer Saleh committed Mar 5, 2012
1 parent ce1900e commit 65014a9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
4 changes: 0 additions & 4 deletions lib/engine_of_war/app.rb
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,6 @@ def data(file)
error(500) { haml :"500" }
error(404) { haml :"404" }

get "/raise_exception_for_testing" do
raise RuntimeError, "Oh, holy crap!"
end

get "/*.atom" do |collection|
content_type :rss
builder do |xml|
Expand Down
7 changes: 5 additions & 2 deletions spec/error_pages_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,13 @@
end

describe "given a /public/500.html page" do
before { create_template("500.haml", "Bam") }
before do
create_template("raise.html.haml", ".h1= raise RuntimeError")
create_template("500.haml", "Bam")
end

it "renders the page when there's an error" do
visit "/raise_exception_for_testing"
visit "/raise"
page.should have_selector('body p:contains("Bam")')
end
end
Expand Down

0 comments on commit 65014a9

Please sign in to comment.