summaryrefslogtreecommitdiff
path: root/spec/functional/util
diff options
context:
space:
mode:
authorJay Mundrawala <jdmundrawala@gmail.com>2014-08-22 14:49:53 -0700
committerJay Mundrawala <jdmundrawala@gmail.com>2014-09-19 12:47:34 -0700
commit31f0e0a53d82d4cab7b607e367dec5ec6104847c (patch)
tree0e9125f44d2a004715261673878a055d2e8ef68a /spec/functional/util
parent7e5daa0ef8486275c82e694d1862d56b5a21f417 (diff)
downloadchef-31f0e0a53d82d4cab7b607e367dec5ec6104847c.tar.gz
Deal with LCM failing when a resource does not support WhatIf
Diffstat (limited to 'spec/functional/util')
-rw-r--r--spec/functional/util/powershell/cmdlet_spec.rb8
1 files changed, 6 insertions, 2 deletions
diff --git a/spec/functional/util/powershell/cmdlet_spec.rb b/spec/functional/util/powershell/cmdlet_spec.rb
index 57a1117b51..c392a2ee66 100644
--- a/spec/functional/util/powershell/cmdlet_spec.rb
+++ b/spec/functional/util/powershell/cmdlet_spec.rb
@@ -40,8 +40,12 @@ describe Chef::Util::Powershell::Cmdlet, :windows_only do
expect(result.succeeded?).to eq(true)
end
- it "returns a PowershellCmdletException exception if the command cannot be executed" do
- expect {invalid_cmdlet.run}.to raise_error(Chef::Exceptions::PowershellCmdletException)
+ it "#run does not raise a PowershellCmdletException exception if the command cannot be executed" do
+ expect {invalid_cmdlet.run}.not_to raise_error
+ end
+
+ it "#run! raises a PowershellCmdletException exception if the command cannot be executed" do
+ expect {invalid_cmdlet.run!}.to raise_error(Chef::Exceptions::PowershellCmdletException)
end
it "executes a 64-bit command on a 64-bit OS, 32-bit otherwise" do