Sha256: 22084be2e752cb57a38e9d340211d5bc3ddd8f9a10eb8bfb73d5888c398593cd
Contents?: true
Size: 826 Bytes
Versions: 8
Compression:
Stored size: 826 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(:log).with('info', UniformNotifier::Exception.new('notify rollbar')) UniformNotifier.rollbar = true UniformNotifier::RollbarNotifier.out_of_channel_notify(title: 'notify rollbar') end it 'should notify rollbar' do expect(Rollbar).to receive(:log).with('warning', UniformNotifier::Exception.new('notify rollbar')) UniformNotifier.rollbar = { level: 'warning' } UniformNotifier::RollbarNotifier.out_of_channel_notify(title: 'notify rollbar') end end
Version data entries
8 entries across 8 versions & 1 rubygems