diff options
author | Julian C. Dunn <jdunn@chef.io> | 2015-03-08 00:47:12 -0500 |
---|---|---|
committer | Julian C. Dunn <jdunn@chef.io> | 2015-03-08 00:47:12 -0500 |
commit | 53051e9a7f2c07836e1509a551ffd85dc8ca7bec (patch) | |
tree | d64aa7714d9288e89c2c3a26bf575fb34959ebd6 /lib/chef/audit | |
parent | b57ede8e5d829f623aceb7d7b77631f9c63d539f (diff) | |
download | chef-53051e9a7f2c07836e1509a551ffd85dc8ca7bec.tar.gz |
Remove UNIX-specific assumptions from audit runner.
Minimally fixes #2973
Diffstat (limited to 'lib/chef/audit')
-rw-r--r-- | lib/chef/audit/runner.rb | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/lib/chef/audit/runner.rb b/lib/chef/audit/runner.rb index 13ba95428c..13c2823dca 100644 --- a/lib/chef/audit/runner.rb +++ b/lib/chef/audit/runner.rb @@ -79,11 +79,15 @@ class Chef require 'rspec' require 'rspec/its' require 'specinfra' + require 'specinfra/helper' + require 'specinfra/helper/set' require 'serverspec/helper' require 'serverspec/matcher' require 'serverspec/subject' require 'chef/audit/audit_event_proxy' require 'chef/audit/rspec_formatter' + + Specinfra::Backend::Cmd.send(:include, Specinfra::Helper::Set) end # Configure RSpec just the way we like it: @@ -136,9 +140,13 @@ class Chef end end - # Set up the backend for Specinfra/Serverspec. :exec is the local system. + # Set up the backend for Specinfra/Serverspec. :exec is the local system; on Windows, it is :cmd def configure_specinfra - Specinfra.configuration.backend = :exec + if Chef::Platform.windows? + Specinfra.configuration.backend = :cmd + else + Specinfra.configuration.backend = :exec + end end # Iterates through the control groups registered to this run_context, builds an |