diff options
author | Lamont Granquist <lamont@scriptkiddie.org> | 2016-02-12 14:10:29 -0800 |
---|---|---|
committer | Lamont Granquist <lamont@scriptkiddie.org> | 2016-02-12 14:10:29 -0800 |
commit | 5959add42e911e14918c41d0212f6ba8e0425d11 (patch) | |
tree | ff8f50461fe5bac36366013d715ea6b2b04868e0 /spec | |
parent | 23e71b551db1908603345ff196e0dddeff01ba4f (diff) | |
download | chef-5959add42e911e14918c41d0212f6ba8e0425d11.tar.gz |
fix specs
Diffstat (limited to 'spec')
-rw-r--r-- | spec/unit/cookbook_loader_spec.rb | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/spec/unit/cookbook_loader_spec.rb b/spec/unit/cookbook_loader_spec.rb index 3f4a7486ce..db10a4eb4f 100644 --- a/spec/unit/cookbook_loader_spec.rb +++ b/spec/unit/cookbook_loader_spec.rb @@ -45,14 +45,23 @@ describe Chef::CookbookLoader do once. and_call_original end + expect(Chef::Log).to receive(:deprecation).with(/The cookbook\(s\): openldap exist in multiple places in your cookbook_path./) cookbook_loader.load_cookbooks end context "after loading all cookbooks" do before(:each) do + expect(Chef::Log).to receive(:deprecation).with(/The cookbook\(s\): openldap exist in multiple places in your cookbook_path./) cookbook_loader.load_cookbooks end + it "should be possible to reload all the cookbooks without triggering deprecation warnings on all of them" do + start_merged_cookbooks = cookbook_loader.merged_cookbooks + expect(Chef::Log).to receive(:deprecation).with(/The cookbook\(s\): openldap exist in multiple places in your cookbook_path./) + cookbook_loader.load_cookbooks + expect(cookbook_loader.merged_cookbooks).to eql(start_merged_cookbooks) + end + describe "[]" do it "should return cookbook objects with []" do expect(cookbook_loader[:openldap]).to be_a_kind_of(Chef::CookbookVersion) @@ -98,7 +107,6 @@ describe Chef::CookbookLoader do describe "referencing cookbook files" do it "should find all the cookbooks in the cookbook path" do - cookbook_loader.load_cookbooks expect(cookbook_loader).to have_key(:openldap) expect(cookbook_loader).to have_key(:apache2) end @@ -260,6 +268,7 @@ describe Chef::CookbookLoader do describe "loading all cookbooks after loading only one cookbook" do before(:each) do + expect(Chef::Log).to receive(:deprecation).with(/The cookbook\(s\): openldap exist in multiple places in your cookbook_path./) cookbook_loader.load_cookbooks end |