Sha256: 3643299b30ab3f08cac251b58bec0cfe4f96b05cd99c9407ed5fe015b06c0477

Contents?: true

Size: 832 Bytes

Versions: 9

Compression:

Stored size: 832 Bytes

Contents

# frozen_string_literal: true

require 'spec_helper'

class Airbrake
  # mock Airbrake
end

RSpec.describe UniformNotifier::AirbrakeNotifier do
  it 'should not notify airbrake' do
    expect(UniformNotifier::AirbrakeNotifier.out_of_channel_notify(title: 'notify airbrake')).to be_nil
  end

  it 'should notify airbrake' do
    expect(Airbrake).to receive(:notify).with(UniformNotifier::Exception.new('notify airbrake'), {})

    UniformNotifier.airbrake = true
    UniformNotifier::AirbrakeNotifier.out_of_channel_notify(title: 'notify airbrake')
  end

  it 'should notify airbrake' do
    expect(Airbrake).to receive(:notify).with(UniformNotifier::Exception.new('notify airbrake'), foo: :bar)

    UniformNotifier.airbrake = { foo: :bar }
    UniformNotifier::AirbrakeNotifier.out_of_channel_notify('notify airbrake')
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

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