summaryrefslogtreecommitdiff
path: root/spec/functional/knife
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/functional/knife
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/functional/knife')
-rw-r--r--spec/functional/knife/cookbook_delete_spec.rb8
-rw-r--r--spec/functional/knife/exec_spec.rb2
-rw-r--r--spec/functional/knife/smoke_test.rb2
-rw-r--r--spec/functional/knife/ssh_spec.rb2
4 files changed, 7 insertions, 7 deletions
diff --git a/spec/functional/knife/cookbook_delete_spec.rb b/spec/functional/knife/cookbook_delete_spec.rb
index 1757b22842..a43e3a36c4 100644
--- a/spec/functional/knife/cookbook_delete_spec.rb
+++ b/spec/functional/knife/cookbook_delete_spec.rb
@@ -44,7 +44,7 @@ describe Chef::Knife::CookbookDelete do
before do
@knife.name_args = %w{no-such-cookbook}
- @api.get("/cookbooks/no-such-cookbook", 404, Chef::JSONCompat.to_json({"error"=>"dear Tim, no. -Sent from my iPad"}))
+ @api.get("/cookbooks/no-such-cookbook", 404, Chef::JSONCompat.to_json({ "error" => "dear Tim, no. -Sent from my iPad" }))
end
around do |ex|
@@ -62,7 +62,7 @@ describe Chef::Knife::CookbookDelete do
it "logs an error and exits" do
allow(@knife.ui).to receive(:stderr).and_return(log_output)
- expect {@knife.run}.to raise_error(SystemExit)
+ expect { @knife.run }.to raise_error(SystemExit)
expect(log_output.string).to match(/Cannot find a cookbook named no-such-cookbook to delete/)
end
@@ -71,7 +71,7 @@ describe Chef::Knife::CookbookDelete do
context "when there is only one version of a cookbook" do
before do
@knife.name_args = %w{obsolete-cookbook}
- @cookbook_list = {"obsolete-cookbook" => { "versions" => ["version" => "1.0.0"]} }
+ @cookbook_list = { "obsolete-cookbook" => { "versions" => ["version" => "1.0.0"] } }
@api.get("/cookbooks/obsolete-cookbook", 200, Chef::JSONCompat.to_json(@cookbook_list))
end
@@ -114,7 +114,7 @@ describe Chef::Knife::CookbookDelete do
@knife.name_args = %w{obsolete-cookbook}
versions = ["1.0.0", "1.1.0", "1.2.0"]
with_version = lambda { |version| { "version" => version } }
- @cookbook_list = {"obsolete-cookbook" => { "versions" => versions.map(&with_version) } }
+ @cookbook_list = { "obsolete-cookbook" => { "versions" => versions.map(&with_version) } }
@api.get("/cookbooks/obsolete-cookbook", 200, Chef::JSONCompat.to_json(@cookbook_list))
end
diff --git a/spec/functional/knife/exec_spec.rb b/spec/functional/knife/exec_spec.rb
index 62e3a4c214..838d15671c 100644
--- a/spec/functional/knife/exec_spec.rb
+++ b/spec/functional/knife/exec_spec.rb
@@ -44,7 +44,7 @@ describe Chef::Knife::Exec do
it "executes a script in the context of the chef-shell main context" do
@node = Chef::Node.new
@node.name("ohai-world")
- response = {"rows" => [@node],"start" => 0,"total" => 1}
+ response = { "rows" => [@node], "start" => 0, "total" => 1 }
@api.get(%r{^/search/node}, 200, Chef::JSONCompat.to_json(response))
code = "$output.puts nodes.all"
@knife.config[:exec] = code
diff --git a/spec/functional/knife/smoke_test.rb b/spec/functional/knife/smoke_test.rb
index 8681a01873..350644d177 100644
--- a/spec/functional/knife/smoke_test.rb
+++ b/spec/functional/knife/smoke_test.rb
@@ -31,7 +31,7 @@ describe "knife smoke tests" do
knife_cmd.error!
expect(knife_cmd.stdout).to include(Chef::VERSION)
end
-
+
it "can run and show help" do
knife_path = File.expand_path("../../bin/knife", CHEF_SPEC_DATA)
knife_cmd = Mixlib::ShellOut.new("#{knife_path} --help")
diff --git a/spec/functional/knife/ssh_spec.rb b/spec/functional/knife/ssh_spec.rb
index e516590905..a23220ed52 100644
--- a/spec/functional/knife/ssh_spec.rb
+++ b/spec/functional/knife/ssh_spec.rb
@@ -262,7 +262,7 @@ describe Chef::Knife::Ssh do
end
end
- def setup_knife(params=[])
+ def setup_knife(params = [])
@knife = Chef::Knife::Ssh.new(params)
# We explicitly avoid running #configure_chef, which would read a knife.rb
# if available, but #merge_configs (which is called by #configure_chef) is