Skip to content

Instantly share code, notes, and snippets.

@changa
Created June 4, 2010 13:32
Show Gist options
  • Save changa/425415 to your computer and use it in GitHub Desktop.
Save changa/425415 to your computer and use it in GitHub Desktop.
# Stupid dirty trick to return a HTTP status code 500 when testing a Rails app
class ApplicationController < ActionController::Base
if Rails.env == 'test'
rescue_from 'ActionView::TemplateError' do |exception|
render :text => exception, :status => 500
end
end
end
# Pfffff... Doesn't work, actually!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment