Advertisement
Guest User

Untitled

a guest
May 27th, 2018
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. # Stupid dirty trick to return a HTTP status code 500 when testing a Rails app
  2.  
  3. class ApplicationController < ActionController::Base
  4.  
  5. if Rails.env == 'test'
  6. rescue_from 'ActionView::TemplateError' do |exception|
  7. render :text => exception, :status => 500
  8. end
  9. end
  10.  
  11. end
  12.  
  13. # Pfffff... Doesn't work, actually!
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement