summaryrefslogtreecommitdiff
path: root/spec/support
diff options
context:
space:
mode:
authornimisha <nimisha.sharad@msystechnologies.com>2017-05-11 21:44:38 +0530
committernimisha <nimisha.sharad@msystechnologies.com>2017-05-11 21:56:28 +0530
commit707ffe04e34f37716a20e8c7099bafc27677894b (patch)
treebeabaac1d177699fb8bf69971c4f393819377d5e /spec/support
parentbc8f7d1f62b121589d5f6f10ff7aa536bd4af430 (diff)
downloadchef-707ffe04e34f37716a20e8c7099bafc27677894b.tar.gz
Added choco_include? filter
Signed-off-by: nimisha <nimisha.sharad@msystechnologies.com>
Diffstat (limited to 'spec/support')
-rw-r--r--spec/support/platform_helpers.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/spec/support/platform_helpers.rb b/spec/support/platform_helpers.rb
index 120e73740d..019cb9a912 100644
--- a/spec/support/platform_helpers.rb
+++ b/spec/support/platform_helpers.rb
@@ -2,9 +2,11 @@ require "fcntl"
require "chef/mixin/shell_out"
require "ohai/mixin/http_helper"
require "ohai/mixin/gce_metadata"
+require "chef/mixin/powershell_out"
class ShellHelpers
extend Chef::Mixin::ShellOut
+ extend Chef::Mixin::PowershellOut
end
# magic stolen from bundler/spec/support/less_than_proc.rb
@@ -231,3 +233,8 @@ def gce?
rescue SocketError
false
end
+
+def choco_installed?
+ result = ShellHelpers.powershell_out("choco --version")
+ result.stderr.empty? ? true : false
+end