diff options
author | Ranjib Dey <dey.ranjib@gmail.com> | 2013-07-09 12:39:15 -0700 |
---|---|---|
committer | Bryan McLellan <btm@opscode.com> | 2013-11-06 09:13:46 -0800 |
commit | 11572f73a01621a171fa1c302aee711541cec931 (patch) | |
tree | 056d56b269d695e53f178237255aa169fcf4c6af /spec/unit/config_spec.rb | |
parent | f16fe644dea2497e7512724ad71bfe877dfa312e (diff) | |
download | chef-11572f73a01621a171fa1c302aee711541cec931.tar.gz |
[CHEF-4363] Allow adding event_handlers via config file
Diffstat (limited to 'spec/unit/config_spec.rb')
-rw-r--r-- | spec/unit/config_spec.rb | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/spec/unit/config_spec.rb b/spec/unit/config_spec.rb index 0a246037fb..e599e9cb6c 100644 --- a/spec/unit/config_spec.rb +++ b/spec/unit/config_spec.rb @@ -360,4 +360,18 @@ describe Chef::Config do expect{Chef::Config.log_location = missing_path}.to raise_error Chef::Exceptions::ConfigurationError end end + describe "Chef::Config[:event_handlers]" do + it "sets a event_handlers to an empty array by default" do + Chef::Config[:event_handlers].should eq([]) + end + it "should be able to add custom handlers" do + o = Object.new + Chef::Config[:event_handlers] << o + Chef::Config[:event_handlers].should be_include(o) + end + end + + after(:each) do + Chef::Config.configuration = @original_config + end end |