summaryrefslogtreecommitdiff
path: root/spec/functional/mixin/powershell_out_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/functional/mixin/powershell_out_spec.rb')
-rw-r--r--spec/functional/mixin/powershell_out_spec.rb10
1 files changed, 9 insertions, 1 deletions
diff --git a/spec/functional/mixin/powershell_out_spec.rb b/spec/functional/mixin/powershell_out_spec.rb
index 1ef9776efc..d9b5c69cd6 100644
--- a/spec/functional/mixin/powershell_out_spec.rb
+++ b/spec/functional/mixin/powershell_out_spec.rb
@@ -18,7 +18,7 @@
require "spec_helper"
require "chef/mixin/powershell_out"
-describe Chef::Mixin::PowershellOut, windows_only: true do
+describe Chef::Mixin::PowershellOut, :windows_only do
include Chef::Mixin::PowershellOut
describe "#powershell_out" do
@@ -26,6 +26,14 @@ describe Chef::Mixin::PowershellOut, windows_only: true do
expect(powershell_out("get-process").run_command.stdout).to match /Handles/
end
+ it "uses :powershell by default" do
+ expect(powershell_out("$PSVersionTable").run_command.stdout).to match /Desktop/
+ end
+
+ it ":pwsh interpreter uses core edition", :pwsh_installed do
+ expect(powershell_out("$PSVersionTable", :pwsh).run_command.stdout).to match /Core/
+ end
+
it "does not raise exceptions when the command is invalid" do
powershell_out("this-is-not-a-valid-command").run_command
end