Sha256: 9794d4a577f9e016e7de2a5480b2333dd02cbadbd78b042dbf49e1ba59e2246d

Contents?: true

Size: 795 Bytes

Versions: 6

Compression:

Stored size: 795 Bytes

Contents

require "spec_helper"

class Airbrake
  # mock Airbrake
end

describe UniformNotifier::AirbrakeNotifier do
  it "should not notify airbrake" do
    UniformNotifier::AirbrakeNotifier.out_of_channel_notify(:title => "notify airbrake").should be_nil
  end

  it "should notify airbrake" do
    Airbrake.should_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
    Airbrake.should_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

6 entries across 6 versions & 1 rubygems

Version Path
uniform_notifier-1.9.0 spec/uniform_notifier/airbrake_spec.rb
uniform_notifier-1.8.0 spec/uniform_notifier/airbrake_spec.rb
uniform_notifier-1.7.0 spec/uniform_notifier/airbrake_spec.rb
uniform_notifier-1.6.2 spec/uniform_notifier/airbrake_spec.rb
uniform_notifier-1.6.1 spec/uniform_notifier/airbrake_spec.rb
uniform_notifier-1.6.0 spec/uniform_notifier/airbrake_spec.rb