diff options
author | Claire McQuin <claire@getchef.com> | 2014-11-21 13:05:29 -0800 |
---|---|---|
committer | Claire McQuin <claire@getchef.com> | 2014-11-21 13:05:29 -0800 |
commit | d5f3fc8b2597e96e67931a706affb925adcf2c22 (patch) | |
tree | 1cefd877c50d12ade994d65e10d69d4bc0d8c304 | |
parent | 04a4e4a2d4504bb1b6fbf5cdc3f0e23f65c93dff (diff) | |
download | chef-d5f3fc8b2597e96e67931a706affb925adcf2c22.tar.gz |
Add omitted config options.
-rw-r--r-- | lib/chef/audit/runner.rb | 25 |
1 files changed, 17 insertions, 8 deletions
diff --git a/lib/chef/audit/runner.rb b/lib/chef/audit/runner.rb index c0b64df99d..9bcdeb7bf3 100644 --- a/lib/chef/audit/runner.rb +++ b/lib/chef/audit/runner.rb @@ -37,11 +37,8 @@ class Chef private def setup require_deps - set_streams - add_formatters - disable_should_syntax + configure_rspec configure_specinfra - add_example_group_methods end def register_controls @@ -62,6 +59,22 @@ class Chef require 'chef/audit/rspec_formatter' end + def configure_rspec + set_streams + add_formatters + disable_should_syntax + add_example_group_methods + + RSpec.configure do |c| + c.color = Chef::Config[:color] + c.expose_dsl_globally = false + end + end + + def configure_specinfra + Specinfra.configuration.backend = :exec + end + def set_streams RSpec.configuration.output_stream = Chef::Config[:log_location] RSpec.configuration.error_stream = Chef::Config[:log_location] @@ -81,10 +94,6 @@ class Chef end end - def configure_specinfra - Specinfra.configuration.backend = :exec - end - def add_example_group_methods RSpec::Core::ExampleGroup.define_example_group_method :__controls__ RSpec::Core::ExampleGroup.define_example_group_method :control |