Fix tests

This commit is contained in:
Mitchell Hashimoto 2014-03-09 18:29:45 -07:00
parent 04a19e05ca
commit 06c881708d
1 changed files with 5 additions and 5 deletions

View File

@ -23,7 +23,7 @@ describe VagrantPlugins::SyncedFolderRSync::RsyncHelper do
machine.stub(guest: guest)
# Don't do all the crazy Cygwin stuff
Vagrant::Util::Platform.stub(:cygwin_windows_path) do |path, **opts|
Vagrant::Util::Platform.stub(:cygwin_path) do |path, **opts|
path
end
end
@ -49,15 +49,15 @@ describe VagrantPlugins::SyncedFolderRSync::RsyncHelper do
subject.rsync_single(machine, ssh_info, opts)
end
it "doesn't call cygwin_windows_path on non-Windows" do
it "doesn't call cygwin_path on non-Windows" do
Vagrant::Util::Platform.stub(windows?: false)
Vagrant::Util::Platform.should_not_receive(:cygwin_windows_path)
Vagrant::Util::Platform.should_not_receive(:cygwin_path)
subject.rsync_single(machine, ssh_info, opts)
end
it "calls cygwin_windows_path on Windows" do
it "calls cygwin_path on Windows" do
Vagrant::Util::Platform.stub(windows?: true)
Vagrant::Util::Platform.should_receive(:cygwin_windows_path).and_return("foo")
Vagrant::Util::Platform.should_receive(:cygwin_path).and_return("foo")
Vagrant::Util::Subprocess.should_receive(:execute).with do |*args|
expect(args[args.length - 3]).to eql("foo/")