From 492042f4f564495a72591d44c5176daf4a5158fa Mon Sep 17 00:00:00 2001 From: danielsdeleo Date: Wed, 8 Jul 2015 10:04:50 -0700 Subject: [PATCH] Ensure we fail in the right way when default source is null --- spec/unit/policyfile_demands_spec.rb | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/spec/unit/policyfile_demands_spec.rb b/spec/unit/policyfile_demands_spec.rb index f426d1649..c2d7da09e 100644 --- a/spec/unit/policyfile_demands_spec.rb +++ b/spec/unit/policyfile_demands_spec.rb @@ -212,6 +212,26 @@ let(:run_list) { ["remote-cb"] } + context "with no default source" do + + it "fails to locate the cookbook" do + expect { policyfile.graph_solution }.to raise_error(Solve::Errors::NoSolutionError) + end + + context "when the policyfile also has a `cookbook` entry for the run list item" do + + before do + policyfile.dsl.cookbook "remote-cb" + end + + it "fails to locate the cookbook" do + expect { policyfile.graph_solution }.to raise_error(Solve::Errors::NoSolutionError) + end + + end + + end + context "And the default source is the community site" do include_context "community default source"