Sha256: 633b2fb0bb911724a134ebdc308057fba273f56971c752e387d02da4ba23ffb4

Contents?: true

Size: 867 Bytes

Versions: 2

Compression:

Stored size: 867 Bytes

Contents

require "spec_helper"

class Honeybadger
  # mock Honeybadger
end

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

  it "should notify honeybadger" do
    expect(Honeybadger).to receive(:notify).with(UniformNotifier::Exception.new("notify honeybadger"), {})

    UniformNotifier.honeybadger = true
    UniformNotifier::HoneybadgerNotifier.out_of_channel_notify(:title => "notify honeybadger")
  end

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

    UniformNotifier.honeybadger = { :foo => :bar }
    UniformNotifier::HoneybadgerNotifier.out_of_channel_notify("notify honeybadger")
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
uniform_notifier-1.11.0 spec/uniform_notifier/honeybadger_spec.rb
uniform_notifier-1.10.0 spec/uniform_notifier/honeybadger_spec.rb