Sha256: ab4f9b400f9b364b705ff7662dd924e073c27cdddda27a49e52acdb9af7278db

Contents?: true

Size: 789 Bytes

Versions: 1

Compression:

Stored size: 789 Bytes

Contents

require "spec_helper"

class Bugsnag
  # mock Bugsnag
end

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

  it "should notify bugsnag" do
    Bugsnag.should_receive(:notify).with(UniformNotifier::Exception.new("notify bugsnag"), {})

    UniformNotifier.bugsnag = true
    UniformNotifier::BugsnagNotifier.out_of_channel_notify(:title => "notify bugsnag")
  end

  it "should notify bugsnag with option" do
    Bugsnag.should_receive(:notify).with(UniformNotifier::Exception.new("notify bugsnag"), :foo => :bar)

    UniformNotifier.bugsnag = { :foo => :bar }
    UniformNotifier::BugsnagNotifier.out_of_channel_notify("notify bugsnag")
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
uniform_notifier-1.6.0 spec/uniform_notifier/bugsnag_spec.rb