Sha256: e1003fc9beff6b22b42cd9325434ce9f922dc3bb8fd8e85f465be8e1c730967c
Contents?: true
Size: 775 Bytes
Versions: 2
Compression:
Stored size: 775 Bytes
Contents
require 'webrick' require 'spec_helper' describe 'Bugsnag' do server = nil queue = Queue.new before do server = WEBrick::HTTPServer.new :Port => 0, :Logger => WEBrick::Log.new("/dev/null"), :AccessLog => [] server.mount_proc '/' do |req, res| queue.push req.body res.status = 200 res.body = "OK\n" end Thread.new{ server.start } end after do server.stop end let(:request) { JSON.parse(queue.pop) } it 'should send notifications over the wire' do Bugsnag.configure do |config| config.endpoint = "localhost:#{server.config[:Port]}" config.use_ssl = false end WebMock.allow_net_connect! Bugsnag.notify 'yo' expect(request['events'][0]['exceptions'][0]['message']).to eq('yo') end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
bugsnag-2.6.1 | spec/integration_spec.rb |
bugsnag-2.6.0 | spec/integration_spec.rb |