Module: Teaspoon::ExceptionHandling

Defined in:
lib/teaspoon/exceptions.rb

Class Method Summary collapse

Class Method Details

.add_rails_handlingObject



21
22
23
24
25
26
27
28
29
# File 'lib/teaspoon/exceptions.rb', line 21

def self.add_rails_handling
  return unless Teaspoon.configuration.driver == "phantomjs"

  #Rails.application.config.assets.debug = false # debugging should be off to display errors in the suite_controller
  Rails.application.config.action_dispatch.show_exceptions = true # we want rails to display exceptions

  # override the render exception method in ActionDispatch to raise a javascript exception
  render_exceptions_with_javascript
end