Sha256: 2cc47e807f8327e76c6ca4af377804480d2763bb074e2888a4af4cebbef947a0

Contents?: true

Size: 796 Bytes

Versions: 1

Compression:

Stored size: 796 Bytes

Contents

require "spec_helper"

class Raven
  # mock Sentry
end

RSpec.describe UniformNotifier::SentryNotifier do
  it "should not notify sentry" do
    expect(UniformNotifier::SentryNotifier.out_of_channel_notify(:title => "notify sentry")).to be_nil
  end

  it "should notify sentry" do
    expect(Raven).to receive(:capture_exception).with(UniformNotifier::Exception.new("notify sentry"), {})

    UniformNotifier.sentry = true
    UniformNotifier::SentryNotifier.out_of_channel_notify(:title => "notify sentry")
  end

  it "should notify sentry" do
    expect(Raven).to receive(:capture_exception).with(UniformNotifier::Exception.new("notify sentry"), :foo => :bar)

    UniformNotifier.sentry = { :foo => :bar }
    UniformNotifier::SentryNotifier.out_of_channel_notify("notify sentry")
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
uniform_notifier-1.11.0 spec/uniform_notifier/sentry_spec.rb