diff --git a/spec/guard/listener_spec.rb b/spec/guard/listener_spec.rb index 430e426..abab55d 100644 --- a/spec/guard/listener_spec.rb +++ b/spec/guard/listener_spec.rb @@ -10,21 +10,24 @@ describe Guard::Listener do it "should use darwin listener on Mac OS X" do Config::CONFIG['target_os'] = 'darwin10.4.0' + Guard::Darwin.stub(:usable?).and_return(true) Guard::Darwin.should_receive(:new) subject.init end it "should use polling listener on Windows" do Config::CONFIG['target_os'] = 'win32' + Guard::Polling.stub(:usable?).and_return(true) Guard::Polling.should_receive(:new) subject.init end - # it "should use inotify_watch on Linux" do - # # Sys::Uname.stub(:sysname).and_return('Linux') - # IO.should_receive(:popen).with(/.*\/inotify_watch\s\./).and_return(pipe_mock) - # subject.start - # end + it "should use linux listener on Linux" do + Config::CONFIG['target_os'] = 'linux' + Guard::Linux.stub(:usable?).and_return(true) + Guard::Linux.should_receive(:new) + subject.init + end end