opscode/chef — pull request #624 by iafonov (2013-02-05 19:22:53+00:00)
Title: [CHEF-3237] Fix Mac OS X service provider. Do not fail when HOME is not set

Fix Mac OS X service provider. Do not fail when HOME is not set

* Do not add `~/Library/LaunchAgents` if HOME is not set
* It is safe to assume that if HOME is not set ~ will not expand - see rb_home_dir function in MRI ruby

NB: It is unclear from the diff but there is not so much changes to file, I've extracted a separate isolated context from existing tests and added a separate context for method that gathers plist dirs. You can see it here - https://github.com/iafonov/chef/blob/20ff8e5a508fad1823809c4e3988c579e05e7d4c/spec/unit/provider/service/macosx_spec.rb#L22