diff options
author | Jay Mundrawala <jdmundrawala@gmail.com> | 2015-03-15 15:14:16 -0700 |
---|---|---|
committer | Jay Mundrawala <jdmundrawala@gmail.com> | 2015-03-20 14:38:50 -0700 |
commit | deeb73825c5b6c7b3fc6738d4d6c484a8ba8307c (patch) | |
tree | be1a3f7db3b3ad976c3c86e5d7cbafd6495a0f6b | |
parent | e203c7bef38e942432cdbc1af0cd08eba6dbf7db (diff) | |
download | chef-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.rb | 5 |
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' |