diff options
| author | sdelano <stephen@opscode.com> | 2011-03-28 12:12:44 -0700 |
|---|---|---|
| committer | sdelano <stephen@opscode.com> | 2011-03-28 12:12:44 -0700 |
| commit | 0d5abf5a488da2ab0b3cc07f465aaaadfe63c090 (patch) | |
| tree | e31ad2c7816caf219073a975487b982d215802ac | |
| parent | b4a2cfba968c4e9f1f1b703ca38fa0d117791865 (diff) | |
| download | chef-qfe-handle_nonsensical_depends.tar.gz | |
spec test for recipe-specific dependenciesqfe-handle_nonsensical_depends
| -rw-r--r-- | chef/spec/unit/run_list_spec.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/chef/spec/unit/run_list_spec.rb b/chef/spec/unit/run_list_spec.rb index 0a2b974a14..901e3c6011 100644 --- a/chef/spec/unit/run_list_spec.rb +++ b/chef/spec/unit/run_list_spec.rb @@ -378,6 +378,14 @@ describe Chef::RunList do cookbooks["d"].version.should == "2.1.0" end + it "should satisfy recipe-specific dependencies" do + depends_on_recipe = cookbook_maker("depends_on_recipe", "1.0", [["f::recipe", "1.0"]]) + @all_cookbooks["depends_on_recipe"] = [depends_on_recipe] + constraints = [vc_maker("depends_on_recipe", "= 1.0")] + cookbooks = Chef::CookbookVersionSelector.constrain(@all_cookbooks, constraints) + cookbooks["f"].version.should == "1.0.0" + end + it "properly sorts version triples, treating each term numerically" do constraints = [vc_maker("n", "> 1.2")] cookbooks = Chef::CookbookVersionSelector.constrain(@all_cookbooks, constraints) |
