Browse files

add airbrake notifier

  • Loading branch information...
1 parent 0843327 commit 7bb8138efd718d18b76cb6323635c97838864e1f @kosmatov kosmatov committed Sep 27, 2012
Showing with 3 additions and 2 deletions.
  1. +2 −1 lib/uniform_notifier/airbrake.rb
  2. +1 −1 spec/uniform_notifier/airbrake_spec.rb
View
3 lib/uniform_notifier/airbrake.rb
@@ -6,7 +6,8 @@ def self.active?
def self.out_of_channel_notify(message)
return unless active?
- Airbrake.notify(message)
+ exception = Exception.new(message)
+ Airbrake.notify(exception)
end
end
end
View
2 spec/uniform_notifier/airbrake_spec.rb
@@ -10,7 +10,7 @@ class Airbrake
end
it "should notify airbrake" do
- Airbrake.should_receive(:notify).with("notify airbrake")
+ Airbrake.should_receive(:notify).with(Exception.new("notify airbrake"))
UniformNotifier.airbrake = true
UniformNotifier::AirbrakeNotifier.out_of_channel_notify("notify airbrake")

0 comments on commit 7bb8138

Please sign in to comment.