diff --git a/spec/guard/notifier_spec.rb b/spec/guard/notifier_spec.rb index 652d9ef..900684d 100644 --- a/spec/guard/notifier_spec.rb +++ b/spec/guard/notifier_spec.rb @@ -35,16 +35,14 @@ describe Guard::Notifier do describe ".turn_off" do before(:each) { subject.turn_off } - if mac? - require 'growl' + if mac? && Guard::Notifier.growl_installed? it "does nothing" do Growl.should_not_receive(:notify) subject.notify 'great', :title => 'Guard' end end - if linux? - require 'libnotify' + if linux? && Guard::Notifier.libnotify_installed? it "does nothing" do Libnotify.should_not_receive(:show) subject.notify 'great', :title => 'Guard'