Sha256: fcba0c1b5f5df73b5da9d8c97d9fa3fc2514a4b891b38bb9d209e84d34d46724

Contents?: true

Size: 886 Bytes

Versions: 9

Compression:

Stored size: 886 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

9 entries across 9 versions & 1 rubygems

Version Path
uniform_notifier-1.15.0 spec/uniform_notifier/honeybadger_spec.rb
uniform_notifier-1.14.2 spec/uniform_notifier/honeybadger_spec.rb
uniform_notifier-1.14.1 spec/uniform_notifier/honeybadger_spec.rb
uniform_notifier-1.14.0 spec/uniform_notifier/honeybadger_spec.rb
uniform_notifier-1.13.2 spec/uniform_notifier/honeybadger_spec.rb
uniform_notifier-1.13.1 spec/uniform_notifier/honeybadger_spec.rb
uniform_notifier-1.13.0 spec/uniform_notifier/honeybadger_spec.rb
uniform_notifier-1.12.1 spec/uniform_notifier/honeybadger_spec.rb
uniform_notifier-1.12.0 spec/uniform_notifier/honeybadger_spec.rb