Sha256: e5b11a5ecf03c8beaf399d79bd50ef54b3e5db350a67c324bcdf38ec9953199d

Contents?: true

Size: 665 Bytes

Versions: 7

Compression:

Stored size: 665 Bytes

Contents

require 'helper'

class BugsnagTestException < RuntimeError; end

class TestBugsnag < Test::Unit::TestCase
  should "get a 200 response from bugsnag for exceptions" do
    Bugsnag.configure do |config|
      config.api_key = "a799e9c27c3fb3017e4a556fd815317e"
      config.endpoint = "http://localhost:8000/notify"
      config.release_stage = "production"
      config.project_root = File.dirname(__FILE__)
      config.user_id = "static_user_id"
    end
    
    begin
      raise BugsnagTestException.new("Exception test from bugsnag gem")
    rescue Exception => e
      response = Bugsnag.notify(e)
      flunk "oh my" if response.code != 200
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
bugsnag-1.0.7 test/test_bugsnag.rb
bugsnag-1.0.6 test/test_bugsnag.rb
bugsnag-1.0.5 test/test_bugsnag.rb
bugsnag-1.0.4 test/test_bugsnag.rb
bugsnag-1.0.3 test/test_bugsnag.rb
bugsnag-1.0.2 test/test_bugsnag.rb
bugsnag-1.0.1 test/test_bugsnag.rb