Sha256: 81849519482daa73139822744e06b1ae77deeb8fc5dcdc5a51f20a22ad8a9221

Contents?: true

Size: 541 Bytes

Versions: 2

Compression:

Stored size: 541 Bytes

Contents

# frozen_string_literal: true

require 'spec_helper'

class Rollbar
  # mock Rollbar
end

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

  it 'should notify rollbar' do
    expect(Rollbar).to receive(:info).with(UniformNotifier::Exception.new('notify rollbar'))

    UniformNotifier.rollbar = true
    UniformNotifier::RollbarNotifier.out_of_channel_notify(title: 'notify rollbar')
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
uniform_notifier-1.12.1 spec/uniform_notifier/rollbar_spec.rb
uniform_notifier-1.12.0 spec/uniform_notifier/rollbar_spec.rb