diff options
author | Tim Smith <tsmith84@gmail.com> | 2020-12-25 19:59:45 -0800 |
---|---|---|
committer | Tim Smith <tsmith84@gmail.com> | 2020-12-25 20:37:21 -0800 |
commit | 1c48a7b9c73e39dc49b03e8196661d1c82f05ac5 (patch) | |
tree | 3d5f1d2e7be47d0834117a37f2ed506685475f7e /spec/unit | |
parent | 07d00d7bc07ccdca7f34abf5bb05ef2d77ebb8dc (diff) | |
download | chef-1c48a7b9c73e39dc49b03e8196661d1c82f05ac5.tar.gz |
Resolve Lint/ParenthesesAsGroupedExpression warningsLint_ParenthesesAsGroupedExpression
Get some consistency here
Signed-off-by: Tim Smith <tsmith@chef.io>
Diffstat (limited to 'spec/unit')
-rw-r--r-- | spec/unit/application/solo_spec.rb | 2 | ||||
-rw-r--r-- | spec/unit/dsl/registry_helper_spec.rb | 2 | ||||
-rw-r--r-- | spec/unit/knife/bootstrap_spec.rb | 2 | ||||
-rw-r--r-- | spec/unit/provider/subversion_spec.rb | 4 | ||||
-rw-r--r-- | spec/unit/resource/windows_task_spec.rb | 2 | ||||
-rw-r--r-- | spec/unit/user_spec.rb | 2 | ||||
-rw-r--r-- | spec/unit/user_v1_spec.rb | 4 |
7 files changed, 9 insertions, 9 deletions
diff --git a/spec/unit/application/solo_spec.rb b/spec/unit/application/solo_spec.rb index 0824f8b5b3..f9302a0bb2 100644 --- a/spec/unit/application/solo_spec.rb +++ b/spec/unit/application/solo_spec.rb @@ -202,7 +202,7 @@ describe Chef::Application::Solo do expect(Chef::Config).to receive(:find_chef_repo_path).and_return(root_path) app.reconfigure expect(Chef::Config.key?(:chef_repo_path)).to be_truthy - expect(Chef::Config[:chef_repo_path]).to eq (root_path) + expect(Chef::Config[:chef_repo_path]).to eq(root_path) end it "runs chef-client in local mode" do diff --git a/spec/unit/dsl/registry_helper_spec.rb b/spec/unit/dsl/registry_helper_spec.rb index 34a8c02039..5ef8caa053 100644 --- a/spec/unit/dsl/registry_helper_spec.rb +++ b/spec/unit/dsl/registry_helper_spec.rb @@ -21,7 +21,7 @@ require "spec_helper" describe Chef::Resource::RegistryKey do - before (:all) do + before(:all) do events = Chef::EventDispatch::Dispatcher.new node = Chef::Node.new node.consume_external_attrs(OHAI_SYSTEM.data, {}) diff --git a/spec/unit/knife/bootstrap_spec.rb b/spec/unit/knife/bootstrap_spec.rb index 3797207b6d..64a59f2ddb 100644 --- a/spec/unit/knife/bootstrap_spec.rb +++ b/spec/unit/knife/bootstrap_spec.rb @@ -320,7 +320,7 @@ describe Chef::Knife::Bootstrap do context "with bootstrap_attribute options" do let(:jsonfile) do - file = Tempfile.new (["node", ".json"]) + file = Tempfile.new(["node", ".json"]) File.open(file.path, "w") { |f| f.puts '{"foo":{"bar":"baz"}}' } file end diff --git a/spec/unit/provider/subversion_spec.rb b/spec/unit/provider/subversion_spec.rb index f249f564b1..0ce9a19ec2 100644 --- a/spec/unit/provider/subversion_spec.rb +++ b/spec/unit/provider/subversion_spec.rb @@ -319,11 +319,11 @@ describe Chef::Provider::Subversion do let(:http_proxy_uri) { "http://somehost:1" } let(:http_no_proxy) { "svn.example.org" } - before (:all) do + before(:all) do @original_env = ENV.to_hash end - after (:all) do + after(:all) do ENV.clear ENV.update(@original_env) end diff --git a/spec/unit/resource/windows_task_spec.rb b/spec/unit/resource/windows_task_spec.rb index c39dcde115..b991cb89de 100644 --- a/spec/unit/resource/windows_task_spec.rb +++ b/spec/unit/resource/windows_task_spec.rb @@ -218,7 +218,7 @@ describe Chef::Resource::WindowsTask, :windows_only do end it "raise error when priority value less than 0" do - expect { resource.priority (-1) }.to raise_error(Chef::Exceptions::ValidationFailed, "Option priority's value -1 should be in range of 0 to 10!") + expect { resource.priority(-1) }.to raise_error(Chef::Exceptions::ValidationFailed, "Option priority's value -1 should be in range of 0 to 10!") end it "raise error when priority values is greater than 10" do diff --git a/spec/unit/user_spec.rb b/spec/unit/user_spec.rb index 24c24f2b78..a52272799c 100644 --- a/spec/unit/user_spec.rb +++ b/spec/unit/user_spec.rb @@ -201,7 +201,7 @@ describe Chef::User do end describe "API Interactions" do - before (:each) do + before(:each) do @user = Chef::User.new @user.name "foobar" @http_client = double("Chef::ServerAPI mock") diff --git a/spec/unit/user_v1_spec.rb b/spec/unit/user_v1_spec.rb index b4b41d832e..17bd4f3094 100644 --- a/spec/unit/user_v1_spec.rb +++ b/spec/unit/user_v1_spec.rb @@ -314,7 +314,7 @@ describe Chef::UserV1 do let(:response_406) { OpenStruct.new(code: "406") } let(:exception_406) { Net::HTTPClientException.new("406 Not Acceptable", response_406) } - before (:each) do + before(:each) do @user = Chef::UserV1.new allow(@user).to receive(:chef_root_rest_v0).and_return(double("chef rest root v0 object")) allow(@user).to receive(:chef_root_rest_v1).and_return(double("chef rest root v1 object")) @@ -535,7 +535,7 @@ describe Chef::UserV1 do end # Versioned API Interactions describe "API Interactions" do - before (:each) do + before(:each) do @user = Chef::UserV1.new @user.username "foobar" @http_client = double("Chef::ServerAPI mock") |