Sha256: 801d0490e49104000c42ff1446bf7da36bc4456efd01e4b12e2659cc5e30f113
Contents?: true
Size: 812 Bytes
Versions: 9
Compression:
Stored size: 812 Bytes
Contents
require 'airbrake/rails/action_cable/notify_callback' RSpec.describe Airbrake::Rails::ActionCable::NotifyCallback do describe ".call" do context "when block raises exception" do let(:channel) { double } let(:block) { proc { raise AirbrakeTestError } } before do expect(channel).to receive(:channel_name).and_return('web_notifications') end it "notifies Airbrake" do expect(Airbrake).to( receive(:notify).with(an_instance_of(Airbrake::Notice)) ) do |notice| expect(notice[:context][:component]).to eq('action_cable') expect(notice[:context][:action]).to eq('web_notifications') end expect { described_class.call(channel, block) } .to raise_error(AirbrakeTestError) end end end end
Version data entries
9 entries across 9 versions & 1 rubygems