listener spec work on every systems
This commit is contained in:
parent
9118f35a8d
commit
69245d9674
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user