summaryrefslogtreecommitdiff
path: root/spec/unit
diff options
context:
space:
mode:
authorClaire McQuin <mcquin@users.noreply.github.com>2014-06-18 15:15:41 -0700
committerClaire McQuin <mcquin@users.noreply.github.com>2014-06-18 15:15:41 -0700
commitc26340adc6f817624fdb68033f6ada261f278881 (patch)
tree6ec2f5825d8834663d32287048aa891720ade293 /spec/unit
parentef303ea54815117b95ff4026e2dc4bdafbf13511 (diff)
parent655e5511f6c4e77fc4d74249c5100da8f3eacf0b (diff)
downloadchef-c26340adc6f817624fdb68033f6ada261f278881.tar.gz
Merge pull request #1494 from brettcave/CHEF-5365_master
CHEF-5365 - chef local crashes if home directory is not set
Diffstat (limited to 'spec/unit')
-rw-r--r--spec/unit/config_spec.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/spec/unit/config_spec.rb b/spec/unit/config_spec.rb
index c467d7d553..37527c04c4 100644
--- a/spec/unit/config_spec.rb
+++ b/spec/unit/config_spec.rb
@@ -341,6 +341,11 @@ describe Chef::Config do
Chef::Config.stub(:env).and_return({ 'USERPROFILE' => "/users/kitten" })
Chef::Config[:user_home].should == "/users/kitten"
end
+
+ it "falls back to the current working directory when HOME and USERPROFILE is not set" do
+ Chef::Config.stub(:env).and_return({})
+ Chef::Config[:user_home].should == Dir.pwd
+ end
end
describe "Chef::Config[:encrypted_data_bag_secret]" do