Check for module_path entry instead of custom environment variable

This commit is contained in:
Chris Roberts 2018-06-18 09:53:22 -07:00
parent 941dd77a90
commit ea4e60247d
1 changed files with 1 additions and 2 deletions

View File

@ -144,8 +144,7 @@ describe VagrantPlugins::HyperV::Driver do
it "should automatically include module path" do it "should automatically include module path" do
expect(Vagrant::Util::PowerShell).to receive(:execute) do |path, *args| expect(Vagrant::Util::PowerShell).to receive(:execute) do |path, *args|
opts = args.detect{|i| i.is_a?(Hash)} opts = args.detect{|i| i.is_a?(Hash)}
expect(opts[:env]).not_to be_nil expect(opts[:module_path]).not_to be_nil
expect(opts[:env]["PSModulePath"]).to include("$env:PSModulePath+")
end end
subject.send(:execute_powershell, "path", {}) subject.send(:execute_powershell, "path", {})
end end