From 7b1f643972b2316e90f5af765842adddd7355fbc Mon Sep 17 00:00:00 2001
From: Ken Dreyer <ktdreyer@ktdreyer.com>
Date: Tue, 26 May 2015 10:54:53 -0600
Subject: [PATCH 4/5] make slack-notifier gem optional for test suite
Fedora does not yet have a rubygem-slack-notifier package. Instead of
bailing out when slack-notifier is missing, just print a warning and
move on.
When Fedora does get a slack-notifier package, we can drop this
patch.
---
test/exception_notifier/slack_notifier_test.rb | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/test/exception_notifier/slack_notifier_test.rb b/test/exception_notifier/slack_notifier_test.rb
index 67a7dbe..ea73685 100644
--- a/test/exception_notifier/slack_notifier_test.rb
+++ b/test/exception_notifier/slack_notifier_test.rb
@@ -1,5 +1,9 @@
require 'test_helper'
-require 'slack-notifier'
+begin
+ require 'slack-notifier'
+rescue LoadError
+ warn 'warning: slack-notifier gem not found; skipping SlackNotifierTest'
+else
class SlackNotifierTest < ActiveSupport::TestCase
@@ -164,3 +168,5 @@ class SlackNotifierTest < ActiveSupport::TestCase
end
end
+
+end
--
2.4.3