Sha256: 944e1b74ede851b09e62a8dc6bee7fe5670759c97aeeed2d90fb9e8dc5d88356

Contents?: true

Size: 664 Bytes

Versions: 4

Compression:

Stored size: 664 Bytes

Contents

require 'spec_helper'
require 'spec_hockeybrake_configuration'

describe 'HockeyLog Exception Tracing' do
  it 'trace standard exception' do
    begin
      raise "This is a sample exception"
    rescue
      notice = Airbrake.send(:build_notice_for, $!)
      HockeyBrake::HockeyLog.generate(notice)
    end
  end

  it 'raise specific exception when trace failed' do
    expect {
      HockeyBrake::HockeyLog.generate("Not a good exception")
    }.to raise_exception(HockeyBrake::HockeyLogException) do |error|
      error.message.should start_with("An exception was thrown during handling of the exception from the HockeyBrake injector")
    end
  end
end





Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
hockeybrake-0.0.9 spec/hockeybrake/hockeylog_spec.rb
hockeybrake-0.0.8 spec/hockeybrake/hockeylog_spec.rb
hockeybrake-0.0.7 spec/hockeybrake/hockeylog_spec.rb
hockeybrake-0.0.6 spec/hockeybrake/hockeylog_spec.rb