Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

now all specs work

  • Loading branch information...
commit 0f7bca7bbd5bbcffee41645f488c538a4e84fb44 1 parent 94e04ec
@stereobooster authored
View
5 lib/guard/listeners/windows.rb
@@ -8,8 +8,9 @@ def initialize
end
def on_change(&callback)
- @fchange.watch Dir.pwd, :all_events do |event|
- files = modified_files([event.watcher.path])
+ @fchange.watch(Dir.pwd, :all_events, :recursive) do |event|
+ paths = [File.expand_path(event.watcher.path) + '/']
+ files = modified_files(paths, {:all => true})
update_last_event
callback.call(files)
end
View
2  spec/guard/listener_spec.rb
@@ -15,7 +15,7 @@
end
it "uses windows listener on Windows" do
- Config::CONFIG['target_os'] = 'win32'
+ Config::CONFIG['target_os'] = 'mingw'
Guard::Windows.stub(:usable?).and_return(true)
Guard::Windows.should_receive(:new)
subject.select_and_init
View
11 spec/guard/listeners/windows_spec.rb
@@ -32,11 +32,20 @@
it "catches new file" do
file = @fixture_path.join("newfile.rb")
+ if File.exists?(file)
+ begin
+ File.delete file
+ rescue
+ end
+ end
File.exists?(file).should be_false
start
FileUtils.touch file
stop
- File.delete file
+ begin
+ File.delete file
+ rescue
+ end
@results.should == ['spec/fixtures/newfile.rb']
end
Please sign in to comment.
Something went wrong with that request. Please try again.