Sha256: e0a1dea839385e0bc0fbe621ff8307631e903fc6dbcc29d638bf5499871130a2

Contents?: true

Size: 682 Bytes

Versions: 9

Compression:

Stored size: 682 Bytes

Contents

require_relative "../test_helper.rb"

require "sidekiq"
# Convince Sidekiq it's on a server :)
module Sidekiq
  def self.server?
    true
  end
end
require "raygun/sidekiq"

class SidekiqFailureTest < Raygun::UnitTest

  def setup
    super

    stub_request(:post, 'https://api.raygun.io/entries').to_return(status: 202)
    fake_successful_entry
  end

  def test_failure_backend_appears_to_work
    assert Raygun::SidekiqReporter.call(
      StandardError.new("Oh no! Your Sidekiq has failed!"),
      sidekick_name: "robin"
    ).success?
  end

  def test_we_are_in_sidekiqs_list_of_error_handlers
    assert Sidekiq.error_handlers.include?(Raygun::SidekiqReporter)
  end

end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
raygun4ruby-3.2.3 test/unit/sidekiq_failure_test.rb
raygun4ruby-3.2.3.pre test/unit/sidekiq_failure_test.rb
raygun4ruby-3.2.1 test/unit/sidekiq_failure_test.rb
raygun4ruby-3.2.0 test/unit/sidekiq_failure_test.rb
raygun4ruby-3.1.1 test/unit/sidekiq_failure_test.rb
raygun4ruby-3.1.0 test/unit/sidekiq_failure_test.rb
raygun4ruby-3.0.0 test/unit/sidekiq_failure_test.rb
raygun4ruby-2.7.1 test/unit/sidekiq_failure_test.rb
raygun4ruby-2.7.0 test/unit/sidekiq_failure_test.rb