summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThom May <thom@chef.io>2017-04-11 13:16:20 +0100
committerThom May <thom@chef.io>2017-04-11 13:16:20 +0100
commit31d599580d4e3bd655d0cc18e33073ecef921d1c (patch)
tree18c4d8234ef21ef2dc471a1f3a0235cdcb11f0a4
parent896c94c70023406e88eb3efaa3c680ab4cc17646 (diff)
downloadchef-31d599580d4e3bd655d0cc18e33073ecef921d1c.tar.gz
Feed rubocop some more
Signed-off-by: Thom May <thom@chef.io>
-rw-r--r--spec/unit/cookbook/manifest_v0_spec.rb24
-rw-r--r--spec/unit/cookbook/manifest_v2_spec.rb19
2 files changed, 12 insertions, 31 deletions
diff --git a/spec/unit/cookbook/manifest_v0_spec.rb b/spec/unit/cookbook/manifest_v0_spec.rb
index b77b98a8e0..0f5cfbe7a4 100644
--- a/spec/unit/cookbook/manifest_v0_spec.rb
+++ b/spec/unit/cookbook/manifest_v0_spec.rb
@@ -47,19 +47,19 @@ describe Chef::Cookbook::ManifestV0 do
let(:expected_hash) do
{
- "attributes" => [{"name"=>"default.rb", "path"=>"attributes/default.rb", "checksum"=>"a88697db56181498a8828d5531271ad9", "specificity"=>"default"}],
+ "attributes" => [{ "name" => "default.rb", "path" => "attributes/default.rb", "checksum" => "a88697db56181498a8828d5531271ad9", "specificity" => "default" }],
"chef_type" => "cookbook_version",
"cookbook_name" => "tatft",
- "definitions" => [{"name"=>"runit_service.rb", "path"=>"definitions/runit_service.rb", "checksum"=>"c40cf9b4c6eb15a8e49e31602f701161", "specificity"=>"default"}],
- "files" => [{"name"=>"giant_blob.tgz", "path"=>"files/default/giant_blob.tgz", "checksum"=>"5b4b194bb80938bb18da7af5c823cb1b", "specificity"=>"default"}],
+ "definitions" => [{ "name" => "runit_service.rb", "path" => "definitions/runit_service.rb", "checksum" => "c40cf9b4c6eb15a8e49e31602f701161", "specificity" => "default" }],
+ "files" => [{ "name" => "giant_blob.tgz", "path" => "files/default/giant_blob.tgz", "checksum" => "5b4b194bb80938bb18da7af5c823cb1b", "specificity" => "default" }],
"frozen?" => false,
- "libraries" => [{"name"=>"ownage.rb", "path"=>"libraries/ownage.rb", "checksum"=>"4686edd9968909034692e09e058d90d9", "specificity"=>"default"}],
+ "libraries" => [{ "name" => "ownage.rb", "path" => "libraries/ownage.rb", "checksum" => "4686edd9968909034692e09e058d90d9", "specificity" => "default" }],
"name" => "tatft-1.2.3",
- "providers" => [{"name"=>"lwp.rb", "path"=>"providers/lwp.rb", "checksum"=>"bc189d68f77bb054d1070aeff7669557", "specificity"=>"default"}],
- "recipes" => [{"name"=>"default.rb", "path"=>"recipes/default.rb", "checksum"=>"09bc749f00c68717d288de9c8d7c644f", "specificity"=>"default"}],
- "resources" => [{"name"=>"lwr.rb", "path"=>"resources/lwr.rb", "checksum"=>"609c40d3d3f269e7edf230277a240ef5", "specificity"=>"default"}],
- "root_files" => [{"name"=>"README.rdoc", "path"=>"README.rdoc", "checksum"=>"cd7be9a1b9b1f33e3bcd9c3f4bc8dde5", "specificity"=>"default"}],
- "templates" => [{"name"=>"configuration.erb", "path"=>"templates/default/configuration.erb", "checksum"=>"d41d8cd98f00b204e9800998ecf8427e", "specificity"=>"default"}],
+ "providers" => [{ "name" => "lwp.rb", "path" => "providers/lwp.rb", "checksum" => "bc189d68f77bb054d1070aeff7669557", "specificity" => "default" }],
+ "recipes" => [{ "name" => "default.rb", "path" => "recipes/default.rb", "checksum" => "09bc749f00c68717d288de9c8d7c644f", "specificity" => "default" }],
+ "resources" => [{ "name" => "lwr.rb", "path" => "resources/lwr.rb", "checksum" => "609c40d3d3f269e7edf230277a240ef5", "specificity" => "default" }],
+ "root_files" => [{ "name" => "README.rdoc", "path" => "README.rdoc", "checksum" => "cd7be9a1b9b1f33e3bcd9c3f4bc8dde5", "specificity" => "default" }],
+ "templates" => [{ "name" => "configuration.erb", "path" => "templates/default/configuration.erb", "checksum" => "d41d8cd98f00b204e9800998ecf8427e", "specificity" => "default" }],
"version" => "1.2.3",
}
end
@@ -67,9 +67,9 @@ describe Chef::Cookbook::ManifestV0 do
describe "#from_hash" do
let(:source_hash) do
{
- "attributes" => [{"name"=>"default.rb", "path"=>"attributes/default.rb", "checksum"=>"a88697db56181498a8828d5531271ad9", "specificity"=>"default"}],
- "recipes" => [{"name"=>"default.rb", "path"=>"recipes/default.rb", "checksum"=>"09bc749f00c68717d288de9c8d7c644f", "specificity"=>"default"}],
- "root_files" => [{"name"=>"README.rdoc", "path"=>"README.rdoc", "checksum"=>"cd7be9a1b9b1f33e3bcd9c3f4bc8dde5", "specificity"=>"default"}],
+ "attributes" => [{ "name" => "default.rb", "path" => "attributes/default.rb", "checksum" => "a88697db56181498a8828d5531271ad9", "specificity" => "default" }],
+ "recipes" => [{ "name" => "default.rb", "path" => "recipes/default.rb", "checksum" => "09bc749f00c68717d288de9c8d7c644f", "specificity" => "default" }],
+ "root_files" => [{ "name" => "README.rdoc", "path" => "README.rdoc", "checksum" => "cd7be9a1b9b1f33e3bcd9c3f4bc8dde5", "specificity" => "default" }],
"name" => "tatft-1.2.3",
"version" => "1.2.3",
}
diff --git a/spec/unit/cookbook/manifest_v2_spec.rb b/spec/unit/cookbook/manifest_v2_spec.rb
index fc0276bf4f..23df950f4a 100644
--- a/spec/unit/cookbook/manifest_v2_spec.rb
+++ b/spec/unit/cookbook/manifest_v2_spec.rb
@@ -45,25 +45,6 @@ describe Chef::Cookbook::ManifestV2 do
let(:all_files) { Dir[File.join(cookbook_root, "**", "**")].reject { |f| File.directory? f } }
- let(:expected_hash) do
- {
- "attributes" => [{"name"=>"default.rb", "path"=>"attributes/default.rb", "checksum"=>"a88697db56181498a8828d5531271ad9", "specificity"=>"default"}],
- "chef_type" => "cookbook_version",
- "cookbook_name" => "tatft",
- "definitions" => [{"name"=>"runit_service.rb", "path"=>"definitions/runit_service.rb", "checksum"=>"c40cf9b4c6eb15a8e49e31602f701161", "specificity"=>"default"}],
- "files" => [{"name"=>"giant_blob.tgz", "path"=>"files/default/giant_blob.tgz", "checksum"=>"5b4b194bb80938bb18da7af5c823cb1b", "specificity"=>"default"}],
- "frozen?" => false,
- "libraries" => [{"name"=>"ownage.rb", "path"=>"libraries/ownage.rb", "checksum"=>"4686edd9968909034692e09e058d90d9", "specificity"=>"default"}],
- "name" => "tatft-1.2.3",
- "providers" => [{"name"=>"lwp.rb", "path"=>"providers/lwp.rb", "checksum"=>"bc189d68f77bb054d1070aeff7669557", "specificity"=>"default"}],
- "recipes" => [{"name"=>"default.rb", "path"=>"recipes/default.rb", "checksum"=>"09bc749f00c68717d288de9c8d7c644f", "specificity"=>"default"}],
- "resources" => [{"name"=>"lwr.rb", "path"=>"resources/lwr.rb", "checksum"=>"609c40d3d3f269e7edf230277a240ef5", "specificity"=>"default"}],
- "root_files" => [{"name"=>"README.rdoc", "path"=>"README.rdoc", "checksum"=>"cd7be9a1b9b1f33e3bcd9c3f4bc8dde5", "specificity"=>"default"}],
- "templates" => [{"name"=>"configuration.erb", "path"=>"templates/default/configuration.erb", "checksum"=>"d41d8cd98f00b204e9800998ecf8427e", "specificity"=>"default"}],
- "version" => "1.2.3",
- }
- end
-
describe "#to_hash" do
it "accepts a cookbook manifest" do
result = described_class.to_hash(cookbook_manifest)