Skip to content

Commit

Permalink
listener spec work on every systems
Browse files Browse the repository at this point in the history
  • Loading branch information
yannlugrin authored and thibaudgg committed Oct 21, 2010
1 parent 9118f35 commit 69245d9
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions spec/guard/listener_spec.rb
Expand Up @@ -10,21 +10,24 @@

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

Expand Down

0 comments on commit 69245d9

Please sign in to comment.