diff --git a/test/unit/plugins/provisioners/chef/config/base_runner_test.rb b/test/unit/plugins/provisioners/chef/config/base_runner_test.rb index 8bc6c6402..65d1e74c7 100644 --- a/test/unit/plugins/provisioners/chef/config/base_runner_test.rb +++ b/test/unit/plugins/provisioners/chef/config/base_runner_test.rb @@ -205,7 +205,10 @@ describe VagrantPlugins::Chef::Config::BaseRunner do describe "#validate_base" do context "when #custom_config_path does not exist" do - let(:path) { "/path/to/file" } + let(:path) do + next "/path/to/file" if !Vagrant::Util::Platform.windows? + "C:/path/to/file" + end before do allow(File).to receive(:file?) diff --git a/test/unit/plugins/pushes/ftp/push_test.rb b/test/unit/plugins/pushes/ftp/push_test.rb index 2430138bc..00ed3ae11 100644 --- a/test/unit/plugins/pushes/ftp/push_test.rb +++ b/test/unit/plugins/pushes/ftp/push_test.rb @@ -41,8 +41,7 @@ describe VagrantPlugins::FTPPush::Push do end @server.start - @dir = Dir.mktmpdir - + @dir = temporary_dir FileUtils.touch("#{@dir}/.hidden.rb") FileUtils.touch("#{@dir}/application.rb") FileUtils.touch("#{@dir}/config.rb") @@ -52,7 +51,6 @@ describe VagrantPlugins::FTPPush::Push do end after(:all) do - FileUtils.rm_rf(@dir) @server.stop end diff --git a/test/unit/plugins/pushes/heroku/push_test.rb b/test/unit/plugins/pushes/heroku/push_test.rb index 8a8ddd97d..a7fe11e05 100644 --- a/test/unit/plugins/pushes/heroku/push_test.rb +++ b/test/unit/plugins/pushes/heroku/push_test.rb @@ -1,5 +1,7 @@ require_relative "../../../base" +require "vagrant/util/platform" + require Vagrant.source_root.join("plugins/pushes/heroku/push") describe VagrantPlugins::HerokuPush::Push do @@ -24,10 +26,13 @@ describe VagrantPlugins::HerokuPush::Push do describe "#push" do let(:branch) { "master" } - - let(:root_path) { "/handy/dandy" } let(:dir) { "#{root_path}/#{config.dir}" } + let(:root_path) do + next "/handy/dandy" if !Vagrant::Util::Platform.windows? + "C:/handy/dandy" + end + before do allow(subject).to receive(:git_branch) .and_return(branch) diff --git a/test/unit/vagrant/box_collection_test.rb b/test/unit/vagrant/box_collection_test.rb index 4a22b5b72..f0e5e0edc 100644 --- a/test/unit/vagrant/box_collection_test.rb +++ b/test/unit/vagrant/box_collection_test.rb @@ -3,7 +3,7 @@ require File.expand_path("../../base", __FILE__) require "pathname" require 'tempfile' -describe Vagrant::BoxCollection do +describe Vagrant::BoxCollection, :skip_windows do include_context "unit" let(:box_class) { Vagrant::Box } diff --git a/test/unit/vagrant/box_test.rb b/test/unit/vagrant/box_test.rb index 07af56acb..f5fa7dac3 100644 --- a/test/unit/vagrant/box_test.rb +++ b/test/unit/vagrant/box_test.rb @@ -6,7 +6,7 @@ require "tempfile" require "vagrant/box_metadata" -describe Vagrant::Box do +describe Vagrant::Box, :skip_windows do include_context "unit" let(:environment) { isolated_environment }