diff options
author | danielsdeleo <dan@getchef.com> | 2014-04-23 10:25:36 -0700 |
---|---|---|
committer | danielsdeleo <dan@getchef.com> | 2014-04-24 09:49:52 -0700 |
commit | 597ce7fe30148ff2688f364eb3ab9747f2ef4cc5 (patch) | |
tree | ab03cdaf1d7cb3dbff4a59021af674d3c40569cc /spec/unit | |
parent | 03db320b200d13ba8980d7c104e955cf2ba7aa53 (diff) | |
download | chef-597ce7fe30148ff2688f364eb3ab9747f2ef4cc5.tar.gz |
Fix constant redefinition warnings in config tests
Diffstat (limited to 'spec/unit')
-rw-r--r-- | spec/unit/config_spec.rb | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/spec/unit/config_spec.rb b/spec/unit/config_spec.rb index 0f9bfce4aa..8f41845644 100644 --- a/spec/unit/config_spec.rb +++ b/spec/unit/config_spec.rb @@ -284,14 +284,12 @@ describe Chef::Config do describe "Chef::Config[:user_home]" do it "should set when HOME is provided" do ENV['HOME'] = "/home/kitten" - load File.expand_path(File.join(File.dirname(__FILE__), "..", "..", "lib", "chef", "config.rb")) Chef::Config[:user_home].should == "/home/kitten" end it "should be set when only USERPROFILE is provided" do ENV['HOME'], ENV['SYSTEMDRIVE'], ENV['HOMEPATH'] = nil, nil, nil ENV['USERPROFILE'] = "/users/kitten" - load File.expand_path(File.join(File.dirname(__FILE__), "..", "..", "lib", "chef", "config.rb")) Chef::Config[:user_home].should == "/users/kitten" end @@ -310,10 +308,6 @@ describe Chef::Config do before do File.stub(:exist?).with(db_secret_default_path).and_return(secret_exists) - # ugh...the only way to properly test this since the conditional - # is evaluated at file load/require time. - $LOADED_FEATURES.delete_if{|f| f =~ /chef\/config\.rb/} - require 'chef/config' end context "#{db_secret_default_path} exists" do |