diff options
Diffstat (limited to 'chef-config/spec/unit/config_spec.rb')
-rw-r--r-- | chef-config/spec/unit/config_spec.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/chef-config/spec/unit/config_spec.rb b/chef-config/spec/unit/config_spec.rb index 0a3dca5b5a..8c20b0bef8 100644 --- a/chef-config/spec/unit/config_spec.rb +++ b/chef-config/spec/unit/config_spec.rb @@ -677,6 +677,17 @@ RSpec.describe ChefConfig::Config do end include_examples "no export" end + + context "no_proxy is set" do + before do + ChefConfig::Config.no_proxy = "localhost" + end + it "exports ENV['no_proxy']" do + expect(ENV).to receive(:[]=).with('no_proxy', "localhost") + expect(ENV).to receive(:[]=).with('NO_PROXY', "localhost") + ChefConfig::Config.export_proxies + end + end end describe "allowing chefdk configuration outside of chefdk" do |