Sha256: d4a232e7e9c4eaf66310563ba93a124f559b1ea67a8aa215650d155da411fa15

Contents?: true

Size: 1.49 KB

Versions: 1

Compression:

Stored size: 1.49 KB

Contents

Feature: On error callbacks

@rails3 @rails4 @rails5 @rails6
Scenario: Rails on_error works on handled errors
  Given I set environment variable "ADD_ON_ERROR" to "true"
  And I start the rails service
  When I navigate to the route "/handled/unthrown" on the rails app
  And I wait to receive a request
  Then the request is valid for the error reporting API version "4.0" for the "Ruby Bugsnag Notifier"
  And the exception "errorClass" equals "RuntimeError"
  And the exception "message" starts with "handled unthrown error"
  And the event "unhandled" is false
  And the event "app.type" equals "rails"
  And the event "metaData.request.url" ends with "/handled/unthrown"
  And the event "metaData.on_error.source" equals "on_error handled"

@rails3 @rails4 @rails5 @rails6
Scenario: Rails on_error works on unhandled errors
  Given I set environment variable "ADD_ON_ERROR" to "true"
  And I start the rails service
  When I navigate to the route "/unhandled/error" on the rails app
  And I wait to receive a request
  Then the request is valid for the error reporting API version "4.0" for the "Ruby Bugsnag Notifier"
  And the exception "errorClass" equals "NameError"
  And the exception "message" starts with "undefined local variable or method `generate_unhandled_error' for #<UnhandledController"
  And the event "unhandled" is true
  And the event "app.type" equals "rails"
  And the event "metaData.request.url" ends with "/unhandled/error"
  And the event "metaData.on_error.source" equals "on_error unhandled"

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
bugsnag-6.15.0 features/rails_features/on_error.feature