From 296837895ac7536edb859f79cc79db5e71068d09 Mon Sep 17 00:00:00 2001 From: Thibaud Guillaume-Gentil Date: Fri, 6 May 2011 21:27:28 +0200 Subject: [PATCH] Skipped Guard::Notifier spec if growl/libnotify not installed --- spec/guard/notifier_spec.rb | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/spec/guard/notifier_spec.rb b/spec/guard/notifier_spec.rb index 603d05b..652d9ef 100644 --- a/spec/guard/notifier_spec.rb +++ b/spec/guard/notifier_spec.rb @@ -10,8 +10,7 @@ describe Guard::Notifier do subject.turn_on end - if mac? - require 'growl' + if mac? && Guard::Notifier.growl_installed? it "uses Growl on Mac OS X" do Growl.should_receive(:notify).with("great", :title => "Guard", @@ -22,8 +21,7 @@ describe Guard::Notifier do end end - if linux? - require 'libnotify' + if linux? && Guard::Notifier.libnotify_installed? it "uses Libnotify on Linux" do Libnotify.should_receive(:show).with( :body => "great",