Permalink
Browse files

Add tests for silence_no_notifier_warning

  • Loading branch information...
jordanbyron committed Sep 19, 2011
1 parent d2c8333 commit a56e20f2ef1f9c81bb94285fec2c0eeef4c457ff
Showing with 8 additions and 0 deletions.
  1. +8 −0 test/test_notifier_test.rb
@@ -20,6 +20,14 @@ def setup
TestNotifier.notify :status => :fail, :message => "You have failed!"
end
+ test "output error message won't display when silence_no_notifier_warning is true" do
+ TestNotifier.silence_no_notifier_warning = true
+ STDERR.expects(:<<).with(TestNotifier::NO_NOTIFIERS_MESSAGE).never
+ Notifier::Placebo.expects(:supported?).returns(true)
+ Notifier::Placebo.expects(:notify).once
+ TestNotifier.notify :status => :fail, :message => "You have failed!"
+ end
+
test "send notification to supported notifier" do
Notifier::Snarl.expects(:supported?).returns(true)
Notifier::Snarl.expects(:notify).with({

0 comments on commit a56e20f

Please sign in to comment.