spec/unit/policyfile_includes_spec.rb in chef-dk-4.1.7 vs spec/unit/policyfile_includes_spec.rb in chef-dk-4.2.0
- old
+ new
@@ -245,11 +245,12 @@
expect { policyfile_lock.to_lock }.not_to raise_error
end
it "emits a lockfile where cookbooks pulled from the upstream are at identical versions" do
expect(policyfile_lock.to_lock["solution_dependencies"]["dependencies"]).to(
- have_key("cookbookC (2.0.0)"))
+ have_key("cookbookC (2.0.0)")
+ )
end
end
context "when some cookbooks are shared as dependencies or transitive dependencies" do
let(:included_policy_expanded_runlist) { ["recipe[cookbookC::default]"] }
@@ -264,11 +265,12 @@
context "and the including policy does not specify any sources" do
let(:run_list) { [] }
it "it defaults to those provided in the included policy lock" do
expect(policyfile_lock.to_lock["solution_dependencies"]["dependencies"]).to(
- have_key("cookbookC (2.0.0)"))
+ have_key("cookbookC (2.0.0)")
+ )
end
end
context "and the including policy specifies a source that is equivalent to the included policy" do
let(:run_list) { [] }
@@ -307,11 +309,12 @@
context "and the including policy's dependencies can be solved with the included policy's locks" do
let(:run_list) { ["local_easy::default"] }
it "solves the dependencies added by the top-level policyfile and emits them in the lockfile" do
expect(policyfile_lock.to_lock["solution_dependencies"]["dependencies"]).to(
- have_key("cookbookC (2.0.0)"))
+ have_key("cookbookC (2.0.0)")
+ )
end
end
context "and the including policy's dependencies cannot be solved with the included policy's locks" do
@@ -373,11 +376,12 @@
end
it "raises an error describing all attribute conflicts" do
expect { policyfile_lock.to_lock }.to raise_error(
ChefDK::Policyfile::AttributeMergeChecker::ConflictError,
- "Attribute '[shared][foo]' provided conflicting values by the following sources [\"user-specified\", \"included\"]")
+ "Attribute '[shared][foo]' provided conflicting values by the following sources [\"user-specified\", \"included\"]"
+ )
end
end
end
context "when override attributes are specified" do
@@ -423,11 +427,12 @@
end
it "raises an error describing all attribute conflicts" do
expect { policyfile_lock.to_lock }.to raise_error(
ChefDK::Policyfile::AttributeMergeChecker::ConflictError,
- "Attribute '[shared][foo]' provided conflicting values by the following sources [\"user-specified\", \"included\"]")
+ "Attribute '[shared][foo]' provided conflicting values by the following sources [\"user-specified\", \"included\"]"
+ )
end
end
end
end
@@ -650,11 +655,12 @@
end
it "raises an error describing the conflict" do
expect { policyfile_lock }.to raise_error(
ChefDK::Policyfile::AttributeMergeChecker::ConflictError,
- "Attribute '[conflict][foo]' provided conflicting values by the following sources [\"included\", \"included2\"]")
+ "Attribute '[conflict][foo]' provided conflicting values by the following sources [\"included\", \"included2\"]"
+ )
end
end
end
context "when override attributes are specified" do
@@ -709,10 +715,11 @@
end
it "raises an error describing the conflict" do
expect { policyfile_lock }.to raise_error(
ChefDK::Policyfile::AttributeMergeChecker::ConflictError,
- "Attribute '[conflict][foo]' provided conflicting values by the following sources [\"included\", \"included2\"]")
+ "Attribute '[conflict][foo]' provided conflicting values by the following sources [\"included\", \"included2\"]"
+ )
end
end
end
end