diff options
author | Yoni Yalovitsky <yoni@fewbytes.com> | 2013-05-19 11:17:36 +0300 |
---|---|---|
committer | Bryan McLellan <btm@opscode.com> | 2013-05-30 09:57:16 -0700 |
commit | 8d6d5ab73f5ee588cafbfc0a41ff3521eb8b1664 (patch) | |
tree | 63ee1f315c90e7e00484f9ecde8839a7afc5bdc5 /spec/unit/config_spec.rb | |
parent | 649d32989d86974a7c19a80aff540aff5b20baaf (diff) | |
download | chef-8d6d5ab73f5ee588cafbfc0a41ff3521eb8b1664.tar.gz |
added a test for CHEF-4114
Diffstat (limited to 'spec/unit/config_spec.rb')
-rw-r--r-- | spec/unit/config_spec.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/spec/unit/config_spec.rb b/spec/unit/config_spec.rb index a8677a9a06..5d10b6927b 100644 --- a/spec/unit/config_spec.rb +++ b/spec/unit/config_spec.rb @@ -18,6 +18,7 @@ # require 'spec_helper' +require 'chef/exceptions' describe Chef::Config do before(:all) do @@ -271,6 +272,13 @@ describe Chef::Config do end end + describe "Chef::Config[:log_location]" do + it "raises ConfigurationError when log_location directory is missing" do + missing_path = "/tmp/non-existing-dir/file" + expect{Chef::Config.log_location = missing_path}.to raise_error Chef::Exceptions::ConfigurationError + end + end + after(:each) do Chef::Config.configuration = @original_config end |