test/unit/notifier_test.rb in integrity-0.1.10 vs test/unit/notifier_test.rb in integrity-0.1.11
- old
+ new
@@ -91,6 +91,18 @@
mock(Notifier::IRC).notify_of_build(build, irc.config) { nil }
irc.notify_of_build(build)
end
+
+ it "handles notifier timeouts" do
+ irc = Notifier.gen(:irc)
+ Notifier.register(Integrity::Notifier::IRC)
+ build = Build.gen
+
+ stub.instance_of(Notifier::IRC).deliver! { raise Timeout::Error }
+ mock(Integrity).log(anything)
+ mock(Integrity).log("Integrity::Notifier::IRC notifier timed out") { nil }
+
+ irc.notify_of_build(build)
+ end
end