Sha256: fc5ec168eed0268e9138431fe1baa4694dc96ff6216302d88879ff1dfd1993e7

Contents?: true

Size: 587 Bytes

Versions: 14

Compression:

Stored size: 587 Bytes

Contents

# frozen_string_literal: true

module ExceptionHelpers
  def raise_exception_with_nil_message
    raise exception_with_nil_message
  end

  def exception_with_nil_message
    exception_with_nil_message = RuntimeError.new(nil)
    allow(exception_with_nil_message).to receive(:message).and_return(nil)
    exception_with_nil_message
  end

  attr_reader :sent_notifications

  def capture_notifications
    @sent_notifications = []
    allow(ExceptionHandling).to receive(:send_exception_to_honeybadger).with(anything) { |exception_info| @sent_notifications << exception_info }
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
exception_handling-2.11.1 spec/helpers/exception_helpers.rb
exception_handling-2.11.0 spec/helpers/exception_helpers.rb
exception_handling-2.10.0 spec/helpers/exception_helpers.rb
exception_handling-2.10.0.pre.2 spec/helpers/exception_helpers.rb
exception_handling-2.10.0.pre.1 spec/helpers/exception_helpers.rb
exception_handling-2.9.0 spec/helpers/exception_helpers.rb
exception_handling-2.9.0.pre.1 spec/helpers/exception_helpers.rb
exception_handling-2.8.1 spec/helpers/exception_helpers.rb
exception_handling-2.8.1.pre.1 spec/helpers/exception_helpers.rb
exception_handling-2.8.1.pre.0 spec/helpers/exception_helpers.rb
exception_handling-2.8.0 spec/helpers/exception_helpers.rb
exception_handling-2.8.0.pre.1 spec/helpers/exception_helpers.rb
exception_handling-2.7.0 spec/helpers/exception_helpers.rb
exception_handling-2.6.1 spec/helpers/exception_helpers.rb