Sha256: 187f173a034aeaea4eda16bb169041fb73a2978faf39ccdae207b061f5de3334

Contents?: true

Size: 679 Bytes

Versions: 3

Compression:

Stored size: 679 Bytes

Contents

require 'bugsnag'

class BugsnagTestException < RuntimeError; end

def get_event_from_payload(payload)
  payload[:events].should have(1).items
  payload[:events].first
end

def get_exception_from_payload(payload)
  event = get_event_from_payload(payload)
  event[:exceptions].should have(1).items
  event[:exceptions].last
end

RSpec.configure do |config|
  config.order = "random"
  
  config.before(:each) do
    Bugsnag.instance_variable_set(:@configuration, Bugsnag::Configuration.new)
    Bugsnag.configure do |config|
      config.api_key = "c9d60ae4c7e70c4b6c4ebd3e8056d2b8"
    end
  end
  
  config.after(:each) do
    Bugsnag.configuration.clear_request_data
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
bugsnag-1.2.4 spec/spec_helper.rb
bugsnag-1.2.3 spec/spec_helper.rb
bugsnag-1.2.2 spec/spec_helper.rb