Sha256: e4ea8c0f10c55ea0bd994b63b816001fb5e692f34b060e42b8f184077c624436

Contents?: true

Size: 618 Bytes

Versions: 1

Compression:

Stored size: 618 Bytes

Contents

# frozen_string_literal: true

require "spec_helper"

describe DispatchRider::AirbrakeErrorHandler do

  describe ".call" do
    let(:message) { DispatchRider::Message.new(subject: "TestMessage", body: "foo") }
    let(:exception) { Exception.new("Something went terribly wrong") }

    example do
      args = [
        exception,
        controller: "DispatchRider",
        action: "TestMessage",
        parameters: { subject: "TestMessage", body: "foo" },
        cgi_data: anything
      ]
      expect(Airbrake).to receive(:notify).with(*args)

      described_class.call(message, exception)
    end
  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
dispatch-rider-2.2.0 spec/lib/dispatch-rider/airbrake_error_handler_spec.rb