summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJay Mundrawala <jdmundrawala@gmail.com>2015-03-15 15:14:16 -0700
committerJay Mundrawala <jdmundrawala@gmail.com>2015-03-20 14:38:50 -0700
commitdeeb73825c5b6c7b3fc6738d4d6c484a8ba8307c (patch)
treebe1a3f7db3b3ad976c3c86e5d7cbafd6495a0f6b
parente203c7bef38e942432cdbc1af0cd08eba6dbf7db (diff)
downloadchef-deeb73825c5b6c7b3fc6738d4d6c484a8ba8307c.tar.gz
Add guard to only run dsc_resource specs on valid powershelljdm/dsc_resource
-rw-r--r--spec/functional/resource/dsc_resource_spec.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/spec/functional/resource/dsc_resource_spec.rb b/spec/functional/resource/dsc_resource_spec.rb
index 9b78cacd93..6f453eeb9f 100644
--- a/spec/functional/resource/dsc_resource_spec.rb
+++ b/spec/functional/resource/dsc_resource_spec.rb
@@ -40,6 +40,11 @@ describe Chef::Resource::DscResource, :windows_powershell_dsc_only do
context 'when Powershell does not support Invoke-DscResource'
context 'when Powershell supports Invoke-DscResource' do
+ before do
+ if !Chef::Platform.supports_dsc_invoke_resource?(node)
+ skip 'Requires Powershell >= 5.0.10018.0'
+ end
+ end
context 'with an invalid dsc resource' do
it 'raises an exception if the resource is not found' do
new_resource.resource 'thisdoesnotexist'