summaryrefslogtreecommitdiff
path: root/spec/unit/knife/cookbook_download_spec.rb
diff options
context:
space:
mode:
authorLamont Granquist <lamont@scriptkiddie.org>2016-02-05 15:00:00 -0800
committerLamont Granquist <lamont@scriptkiddie.org>2016-02-05 15:00:00 -0800
commit686113531d23f30e9973d659c456ae33eb9cff1f (patch)
treef225de7251a8b49b8d183dd168bab0a0addbe23f /spec/unit/knife/cookbook_download_spec.rb
parentd1cf34b059a16a81e0fc48de52ba29863bb41fe6 (diff)
downloadchef-686113531d23f30e9973d659c456ae33eb9cff1f.tar.gz
autofixing whitespace cops
4174 Style/SpaceInsideHashLiteralBraces 1860 Style/SpaceAroundOperators 1336 Style/SpaceInsideBlockBraces 1292 Style/AlignHash 997 Style/SpaceAfterComma 860 Style/SpaceAroundEqualsInParameterDefault 310 Style/EmptyLines 294 Style/IndentationConsistency 267 Style/TrailingWhitespace 238 Style/ExtraSpacing 212 Style/SpaceBeforeBlockBraces 166 Style/MultilineOperationIndentation 144 Style/TrailingBlankLines 120 Style/EmptyLineBetweenDefs 101 Style/IndentationWidth 82 Style/SpaceAroundBlockParameters 40 Style/EmptyLinesAroundMethodBody 29 Style/EmptyLinesAroundAccessModifier 1 Style/RescueEnsureAlignment
Diffstat (limited to 'spec/unit/knife/cookbook_download_spec.rb')
-rw-r--r--spec/unit/knife/cookbook_download_spec.rb42
1 files changed, 21 insertions, 21 deletions
diff --git a/spec/unit/knife/cookbook_download_spec.rb b/spec/unit/knife/cookbook_download_spec.rb
index c515693a53..a8248a80b9 100644
--- a/spec/unit/knife/cookbook_download_spec.rb
+++ b/spec/unit/knife/cookbook_download_spec.rb
@@ -49,20 +49,20 @@ describe Chef::Knife::CookbookDownload do
@manifest_data = {
:recipes => [
- {"path" => "recipes/foo.rb",
- "url" => "http://example.org/files/foo.rb"},
- {"path" => "recipes/bar.rb",
- "url" => "http://example.org/files/bar.rb"},
+ { "path" => "recipes/foo.rb",
+ "url" => "http://example.org/files/foo.rb" },
+ { "path" => "recipes/bar.rb",
+ "url" => "http://example.org/files/bar.rb" },
],
:templates => [
- {"path" => "templates/default/foo.erb",
- "url" => "http://example.org/files/foo.erb"},
- {"path" => "templates/default/bar.erb",
- "url" => "http://example.org/files/bar.erb"},
+ { "path" => "templates/default/foo.erb",
+ "url" => "http://example.org/files/foo.erb" },
+ { "path" => "templates/default/bar.erb",
+ "url" => "http://example.org/files/bar.erb" },
],
:attributes => [
- {"path" => "attributes/default.rb",
- "url" => "http://example.org/files/default.rb"},
+ { "path" => "attributes/default.rb",
+ "url" => "http://example.org/files/default.rb" },
],
}
@@ -102,17 +102,17 @@ describe Chef::Knife::CookbookDownload do
before(:each) do
@files.map { |f| File.dirname(f) }.flatten.uniq.each do |dir|
expect(FileUtils).to receive(:mkdir_p).with("/var/tmp/chef/foobar-1.0.0/#{dir}").
- at_least(:once)
+ at_least(:once)
end
@files_mocks.each_pair do |file, mock|
expect(@rest_mock).to receive(:streaming_request).with("http://example.org/files/#{file}").
- and_return(mock)
+ and_return(mock)
end
@files.each do |f|
expect(FileUtils).to receive(:mv).
- with("/var/tmp/#{File.basename(f)}", "/var/tmp/chef/foobar-1.0.0/#{f}")
+ with("/var/tmp/#{File.basename(f)}", "/var/tmp/chef/foobar-1.0.0/#{f}")
end
end
@@ -165,7 +165,7 @@ describe Chef::Knife::CookbookDownload do
it "should return and set the version to the latest version" do
@knife.config[:latest] = true
expect(@knife).to receive(:available_versions).at_least(:once).
- and_return(["1.0.0", "1.1.0", "2.0.0"])
+ and_return(["1.0.0", "1.1.0", "2.0.0"])
@knife.determine_version
expect(@knife.version.to_s).to eq("2.0.0")
end
@@ -179,15 +179,15 @@ describe Chef::Knife::CookbookDownload do
it "should return nil if there are no versions" do
expect(Chef::CookbookVersion).to receive(:available_versions).
- with("foobar").
- and_return(nil)
+ with("foobar").
+ and_return(nil)
expect(@knife.available_versions).to eq(nil)
end
it "should return the available versions" do
expect(Chef::CookbookVersion).to receive(:available_versions).
- with("foobar").
- and_return(["1.1.0", "2.0.0", "1.0.0"])
+ with("foobar").
+ and_return(["1.1.0", "2.0.0", "1.0.0"])
expect(@knife.available_versions).to eq([Chef::Version.new("1.0.0"),
Chef::Version.new("1.1.0"),
Chef::Version.new("2.0.0")])
@@ -195,9 +195,9 @@ describe Chef::Knife::CookbookDownload do
it "should avoid multiple API calls to the server" do
expect(Chef::CookbookVersion).to receive(:available_versions).
- once.
- with("foobar").
- and_return(["1.1.0", "2.0.0", "1.0.0"])
+ once.
+ with("foobar").
+ and_return(["1.1.0", "2.0.0", "1.0.0"])
@knife.available_versions
@knife.available_versions
end