Sha256: 98132b7ea4ad8bf2734069ba486f3535e62fdc37f951262e408d2c091bec0e8d

Contents?: true

Size: 890 Bytes

Versions: 1

Compression:

Stored size: 890 Bytes

Contents

# frozen_string_literal: true

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

1 entries across 1 versions & 1 rubygems

Version Path
uniform_notifier-1.16.0 spec/uniform_notifier/honeybadger_spec.rb