summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBryan McLellan <btm@loftninjas.org>2014-10-01 12:24:49 -0400
committerBryan McLellan <btm@loftninjas.org>2014-10-01 12:24:49 -0400
commit8e7c8b9f3d4a86ae741fec43d8edefcd14ebb5b5 (patch)
tree4008c0173a7afde581bef8a78d0107dfade81ec2
parenta004f65a359baf38e4cb43d80a1975f58b64eed4 (diff)
downloadchef-btm/guard-order.tar.gz
Update guard functional tests for refactoringbtm/guard-order
We now raise a little late when given a guard interpreter and a block, mostly being lazy. This updates the functional test to check the correct code path.
-rw-r--r--spec/functional/resource/powershell_spec.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/spec/functional/resource/powershell_spec.rb b/spec/functional/resource/powershell_spec.rb
index 1a5454562d..96a356f441 100644
--- a/spec/functional/resource/powershell_spec.rb
+++ b/spec/functional/resource/powershell_spec.rb
@@ -165,7 +165,8 @@ describe Chef::Resource::WindowsScript::PowershellScript, :windows_only do
it "raises an error when given a block and a guard_interpreter" do
resource.guard_interpreter :sh
- expect { resource.only_if { true } }.to raise_error(ArgumentError, /guard_interpreter does not support blocks/)
+ resource.only_if { true }
+ expect { resource.should_skip?(:run) }.to raise_error(ArgumentError, /guard_interpreter does not support blocks/)
end
end