Skip to content

Commit

Permalink
stub #validate! method
Browse files Browse the repository at this point in the history
  • Loading branch information
lamont-granquist committed Oct 21, 2015
1 parent d5f4ee6 commit 19875bc
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions spec/unit/policy_builder/policyfile_spec.rb
Expand Up @@ -662,6 +662,7 @@ def initialize_pb
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"])
Expand All @@ -670,6 +671,7 @@ def initialize_pb
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
Expand Down

0 comments on commit 19875bc

Please sign in to comment.