diff options
author | John Keiser <john@johnkeiser.com> | 2015-04-06 16:56:48 -0700 |
---|---|---|
committer | John Keiser <john@johnkeiser.com> | 2015-04-06 16:56:48 -0700 |
commit | 84b47aebdd5c5411aa93dd7046b67b4f08182753 (patch) | |
tree | a44ca2e6b9ada15221462d8f51966ba88b3af48d /lib/chef_zero/rspec.rb | |
parent | 83228dd232ee090c3a7cee730a053846233e8725 (diff) | |
download | chef-zero-jk/chef_server_options.tar.gz |
Don't pollute global Chef server optionsjk/chef_server_options
Diffstat (limited to 'lib/chef_zero/rspec.rb')
-rw-r--r-- | lib/chef_zero/rspec.rb | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/chef_zero/rspec.rb b/lib/chef_zero/rspec.rb index 2367ef5..18155e8 100644 --- a/lib/chef_zero/rspec.rb +++ b/lib/chef_zero/rspec.rb @@ -54,16 +54,17 @@ module ChefZero end @@chef_server_options = { port: 8900, signals: false, log_requests: true, server_scope: :each } - chef_server_options.merge!(chef_zero_opts) if self.respond_to?(:chef_zero_opts) - chef_server_options.merge!(tags.last) if tags.last.is_a?(Hash) - - Log.debug("Starting Chef server with options #{chef_server_options}") + chef_server_options = self.chef_server_options + chef_server_options = chef_server_options.merge(chef_zero_opts) if self.respond_to?(:chef_zero_opts) + chef_server_options = chef_server_options.merge(tags.last) if tags.last.is_a?(Hash) old_chef_server_url = nil old_node_name = nil old_client_key = nil before chef_server_options[:server_scope] do + Log.debug("Starting Chef server with options #{chef_server_options}") + ChefZero::RSpec.set_server_options(chef_server_options) if chef_server_options[:organization] |