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
|
it "should use darwin listener on Mac OS X" do
|
||||||
Config::CONFIG['target_os'] = 'darwin10.4.0'
|
Config::CONFIG['target_os'] = 'darwin10.4.0'
|
||||||
|
Guard::Darwin.stub(:usable?).and_return(true)
|
||||||
Guard::Darwin.should_receive(:new)
|
Guard::Darwin.should_receive(:new)
|
||||||
subject.init
|
subject.init
|
||||||
end
|
end
|
||||||
|
|
||||||
it "should use polling listener on Windows" do
|
it "should use polling listener on Windows" do
|
||||||
Config::CONFIG['target_os'] = 'win32'
|
Config::CONFIG['target_os'] = 'win32'
|
||||||
|
Guard::Polling.stub(:usable?).and_return(true)
|
||||||
Guard::Polling.should_receive(:new)
|
Guard::Polling.should_receive(:new)
|
||||||
subject.init
|
subject.init
|
||||||
end
|
end
|
||||||
|
|
||||||
# it "should use inotify_watch on Linux" do
|
it "should use linux listener on Linux" do
|
||||||
# # Sys::Uname.stub(:sysname).and_return('Linux')
|
Config::CONFIG['target_os'] = 'linux'
|
||||||
# IO.should_receive(:popen).with(/.*\/inotify_watch\s\./).and_return(pipe_mock)
|
Guard::Linux.stub(:usable?).and_return(true)
|
||||||
# subject.start
|
Guard::Linux.should_receive(:new)
|
||||||
# end
|
subject.init
|
||||||
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user