summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorTim Smith <tsmith@chef.io>2020-04-27 15:30:58 -0700
committerGitHub <noreply@github.com>2020-04-27 15:30:58 -0700
commit6fa4bb2e1530d4318c509398b77a91a78a3afdfd (patch)
tree3dbbefd68adbc097494c20e8b623df967bb3325a /spec
parentb93f25a6989d9938a087975a02472de7fe8e2ac6 (diff)
parent8993959392ca106c0f7ff8e203414f328cf8d146 (diff)
downloadchef-6fa4bb2e1530d4318c509398b77a91a78a3afdfd.tar.gz
Merge pull request #9756 from chef/fix_spec
Fix the powershell spec to use the right method
Diffstat (limited to 'spec')
-rw-r--r--spec/unit/mixin/powershell_exec_spec.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/spec/unit/mixin/powershell_exec_spec.rb b/spec/unit/mixin/powershell_exec_spec.rb
index 8c3e0a4b88..d6f89c0aa1 100644
--- a/spec/unit/mixin/powershell_exec_spec.rb
+++ b/spec/unit/mixin/powershell_exec_spec.rb
@@ -43,11 +43,11 @@ describe Chef::Mixin::PowershellExec, :windows_only do
describe "#powershell_exec!" do
it "runs a basic command and returns a Chef::PowerShell object" do
- expect(object.powershell_exec("$PSVersionTable")).to be_kind_of(Chef::PowerShell::CommandFailed)
+ expect(object.powershell_exec!("$PSVersionTable")).to be_kind_of(Chef::PowerShell)
end
it "raises an error if the command fails" do
- expect { object.powershell_exec("$PSVersionTable") }.to raise_error(Chef::Exceptions::Script)
+ expect(object.powershell_exec!("$PSVersionTable")).to be_kind_of(Chef::PowerShell::CommandFailed)
end
end
end