diff options
Diffstat (limited to 'spec/unit/run_context/cookbook_compiler_spec.rb')
-rw-r--r-- | spec/unit/run_context/cookbook_compiler_spec.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/spec/unit/run_context/cookbook_compiler_spec.rb b/spec/unit/run_context/cookbook_compiler_spec.rb index 52f4772206..5c50c3dd4b 100644 --- a/spec/unit/run_context/cookbook_compiler_spec.rb +++ b/spec/unit/run_context/cookbook_compiler_spec.rb @@ -170,5 +170,17 @@ describe Chef::RunContext::CookbookCompiler do :"circular-dep1", :"test-with-circular-deps"] end + + it "determines if a cookbook is in the list of cookbooks reachable by dependency" do + node.run_list("test-with-deps::default", "test-with-deps::server") + compiler.cookbook_order.should == [:dependency1, :dependency2, :"test-with-deps"] + compiler.unreachable_cookbook?(:dependency1).should be_false + compiler.unreachable_cookbook?(:dependency2).should be_false + compiler.unreachable_cookbook?(:'test-with-deps').should be_false + compiler.unreachable_cookbook?(:'circular-dep1').should be_true + compiler.unreachable_cookbook?(:'circular-dep2').should be_true + end + + end end |