diff options
Diffstat (limited to 'spec/unit')
-rw-r--r-- | spec/unit/policy_builder/policyfile_spec.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/spec/unit/policy_builder/policyfile_spec.rb b/spec/unit/policy_builder/policyfile_spec.rb index b656a66ec3..ed893260c2 100644 --- a/spec/unit/policy_builder/policyfile_spec.rb +++ b/spec/unit/policy_builder/policyfile_spec.rb @@ -662,6 +662,7 @@ describe Chef::PolicyBuilder::Policyfile do it "builds a run context" do expect(cookbook_synchronizer).to receive(:sync_cookbooks) expect_any_instance_of(Chef::RunContext).to receive(:load).with(policy_builder.run_list_expansion_ish) + expect_any_instance_of(Chef::CookbookCollection).to receive(:validate!) run_context = policy_builder.setup_run_context expect(run_context.node).to eq(node) expect(run_context.cookbook_collection.keys).to match_array(["example1", "example2"]) @@ -670,6 +671,7 @@ describe Chef::PolicyBuilder::Policyfile do it "makes the run context available via static method on Chef" do expect(cookbook_synchronizer).to receive(:sync_cookbooks) expect_any_instance_of(Chef::RunContext).to receive(:load).with(policy_builder.run_list_expansion_ish) + expect_any_instance_of(Chef::CookbookCollection).to receive(:validate!) run_context = policy_builder.setup_run_context expect(Chef.run_context).to eq(run_context) end |