Sha256: 330f77b8df5a26254555baca0719dedcdcd4d873e25296ea0f943de8eaea9c47

Contents?: true

Size: 811 Bytes

Versions: 16

Compression:

Stored size: 811 Bytes

Contents

# -*- coding: utf-8 -*-
require_relative "../test_helper.rb"

class RaygunTest < Raygun::UnitTest
  def test_raygun_is_not_configured_with_no_api_key
    Raygun.configuration.api_key = nil
    assert !Raygun.configured?
  end

  def test_should_report_logs_silence_reporting_when_debug_is_on
    logger = setup_logging
    Raygun.configuration.silence_reporting = true
    Raygun.send(:should_report?, Exception.new)

    assert logger.get.include?("silence_reporting"), "silence_reporting was not logged"
  end

  def test_should_report_logs_ignored_exceptions_when_debug_is_on
    logger = setup_logging
    Raygun.configuration.ignore = ["Exception"]
    Raygun.send(:should_report?, Exception.new)

    assert logger.get =~ /skipping reporting of.*Exception.*/, "ignored exception was not logged"
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
raygun4ruby-3.2.3 test/unit/raygun_test.rb
raygun4ruby-3.2.3.pre test/unit/raygun_test.rb
raygun4ruby-3.2.1 test/unit/raygun_test.rb
raygun4ruby-3.2.0 test/unit/raygun_test.rb
raygun4ruby-3.1.1 test/unit/raygun_test.rb
raygun4ruby-3.1.0 test/unit/raygun_test.rb
raygun4ruby-3.0.0 test/unit/raygun_test.rb
raygun4ruby-2.7.1 test/unit/raygun_test.rb
raygun4ruby-2.7.0 test/unit/raygun_test.rb
raygun4ruby-2.6.0 test/unit/raygun_test.rb
raygun4ruby-2.5.0 test/unit/raygun_test.rb
raygun4ruby-2.4.1 test/unit/raygun_test.rb
raygun4ruby-2.4.0 test/unit/raygun_test.rb
raygun4ruby-2.3.0 test/unit/raygun_test.rb
raygun4ruby-2.2.0 test/unit/raygun_test.rb
raygun4ruby-2.1.0 test/unit/raygun_test.rb