diff options
author | Lamont Granquist <lamont@scriptkiddie.org> | 2019-07-02 15:59:11 -0700 |
---|---|---|
committer | Lamont Granquist <lamont@scriptkiddie.org> | 2019-07-02 15:59:11 -0700 |
commit | 1909f56148ce8f56777234d651dde1824f1017b0 (patch) | |
tree | e038fadca8a28a0dbf2ee6a06b56f602e6d09758 /spec | |
parent | f50ffe2b1b3b0afc7aa2b01a9356e439f78a5fcd (diff) | |
download | chef-1909f56148ce8f56777234d651dde1824f1017b0.tar.gz |
Style/EmptyMethod
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
Diffstat (limited to 'spec')
-rw-r--r-- | spec/integration/recipes/provider_choice.rb | 3 | ||||
-rw-r--r-- | spec/integration/recipes/recipe_dsl_spec.rb | 3 | ||||
-rw-r--r-- | spec/spec_helper.rb | 9 | ||||
-rw-r--r-- | spec/support/platforms/win32/spec_service.rb | 12 | ||||
-rw-r--r-- | spec/unit/application/knife_spec.rb | 3 | ||||
-rw-r--r-- | spec/unit/cookbook_site_streaming_uploader_spec.rb | 3 | ||||
-rw-r--r-- | spec/unit/mixin/template_spec.rb | 12 | ||||
-rw-r--r-- | spec/unit/mixin/unformatter_spec.rb | 3 | ||||
-rw-r--r-- | spec/unit/mixin/user_context_spec.rb | 3 | ||||
-rw-r--r-- | spec/unit/provider_spec.rb | 6 | ||||
-rw-r--r-- | spec/unit/resource/file/verification_spec.rb | 3 | ||||
-rw-r--r-- | spec/unit/shell_spec.rb | 3 |
12 files changed, 21 insertions, 42 deletions
diff --git a/spec/integration/recipes/provider_choice.rb b/spec/integration/recipes/provider_choice.rb index 1895d93891..dea58230db 100644 --- a/spec/integration/recipes/provider_choice.rb +++ b/spec/integration/recipes/provider_choice.rb @@ -16,8 +16,7 @@ describe "Recipe DSL methods" do context "And class Chef::Provider::ProviderThingy with no provides" do before :context do class Chef::Provider::ProviderThingy < Chef::Provider - def load_current_resource - end + def load_current_resource; end def action_create Chef::Log.warn("hello from #{self.class.name}") diff --git a/spec/integration/recipes/recipe_dsl_spec.rb b/spec/integration/recipes/recipe_dsl_spec.rb index 6c0cc305f9..29ac41fdce 100644 --- a/spec/integration/recipes/recipe_dsl_spec.rb +++ b/spec/integration/recipes/recipe_dsl_spec.rb @@ -28,8 +28,7 @@ describe "Recipe DSL methods" do Provider end class Provider < Chef::Provider - def load_current_resource - end + def load_current_resource; end def action_create BaseThingy.created_name = new_resource.name diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index adfb262637..ac5f68b484 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -311,14 +311,11 @@ require "thread" module WEBrick module Utils class TimeoutHandler - def initialize - end + def initialize; end - def register(*args) - end + def register(*args); end - def cancel(*args) - end + def cancel(*args); end end end end diff --git a/spec/support/platforms/win32/spec_service.rb b/spec/support/platforms/win32/spec_service.rb index 5548a79afc..5b30c567cc 100644 --- a/spec/support/platforms/win32/spec_service.rb +++ b/spec/support/platforms/win32/spec_service.rb @@ -39,17 +39,13 @@ class SpecService < ::Win32::Daemon # Control Signal Callback Methods ################################################################################ - def service_stop - end + def service_stop; end - def service_pause - end + def service_pause; end - def service_resume - end + def service_resume; end - def service_shutdown - end + def service_shutdown; end end # To run this file as a service, it must be called as a script from within diff --git a/spec/unit/application/knife_spec.rb b/spec/unit/application/knife_spec.rb index f8f5560597..ea5083ac15 100644 --- a/spec/unit/application/knife_spec.rb +++ b/spec/unit/application/knife_spec.rb @@ -28,8 +28,7 @@ describe Chef::Application::Knife do long: "-optwithdefault VALUE", default: "default-value" - def run - end + def run; end end end diff --git a/spec/unit/cookbook_site_streaming_uploader_spec.rb b/spec/unit/cookbook_site_streaming_uploader_spec.rb index 87ff7abdd7..af714094d0 100644 --- a/spec/unit/cookbook_site_streaming_uploader_spec.rb +++ b/spec/unit/cookbook_site_streaming_uploader_spec.rb @@ -25,8 +25,7 @@ class FakeTempfile @basename = basename end - def close - end + def close; end def path "#{@basename}.ZZZ" diff --git a/spec/unit/mixin/template_spec.rb b/spec/unit/mixin/template_spec.rb index 96b983a9dd..04071988ad 100644 --- a/spec/unit/mixin/template_spec.rb +++ b/spec/unit/mixin/template_spec.rb @@ -242,17 +242,13 @@ describe Chef::Mixin::Template, "render_template" do it "emits a warning when overriding 'core' methods" do mod = Module.new do - def render - end + def render; end - def node - end + def node; end - def render_template - end + def render_template; end - def render_template_from_string - end + def render_template_from_string; end end %w{node render render_template render_template_from_string}.each do |method_name| expect(Chef::Log).to receive(:warn).with(/^Core template method `#{method_name}' overridden by extension module/) diff --git a/spec/unit/mixin/unformatter_spec.rb b/spec/unit/mixin/unformatter_spec.rb index b2b57c150c..3c8dba1962 100644 --- a/spec/unit/mixin/unformatter_spec.rb +++ b/spec/unit/mixin/unformatter_spec.rb @@ -22,8 +22,7 @@ require "chef/mixin/unformatter" class Chef::UnformatterTest include Chef::Mixin::Unformatter - def foo - end + def foo; end end diff --git a/spec/unit/mixin/user_context_spec.rb b/spec/unit/mixin/user_context_spec.rb index 896241f173..31e182d042 100644 --- a/spec/unit/mixin/user_context_spec.rb +++ b/spec/unit/mixin/user_context_spec.rb @@ -56,8 +56,7 @@ describe "a class that mixes in user_context" do let(:block_object) do class BlockClass - def block_method - end + def block_method; end end BlockClass.new end diff --git a/spec/unit/provider_spec.rb b/spec/unit/provider_spec.rb index 496871614a..d7db8e8c1c 100644 --- a/spec/unit/provider_spec.rb +++ b/spec/unit/provider_spec.rb @@ -24,8 +24,7 @@ class NoWhyrunDemonstrator < Chef::Provider false end - def load_current_resource - end + def load_current_resource; end def action_foo @system_state_altered = true @@ -39,8 +38,7 @@ class ConvergeActionDemonstrator < Chef::Provider true end - def load_current_resource - end + def load_current_resource; end def action_foo converge_by("running a state changing action") do diff --git a/spec/unit/resource/file/verification_spec.rb b/spec/unit/resource/file/verification_spec.rb index f0ec999019..57c58249eb 100644 --- a/spec/unit/resource/file/verification_spec.rb +++ b/spec/unit/resource/file/verification_spec.rb @@ -128,8 +128,7 @@ describe Chef::Resource::File::Verification do before(:each) do class Chef::Resource::File::Verification::Turtle < Chef::Resource::File::Verification provides :cats - def verify(path, opts) - end + def verify(path, opts); end end allow(Chef::Resource::File::Verification::Turtle).to receive(:new).and_return(registered_verification) end diff --git a/spec/unit/shell_spec.rb b/spec/unit/shell_spec.rb index 8ba1afa72a..aa573706b1 100644 --- a/spec/unit/shell_spec.rb +++ b/spec/unit/shell_spec.rb @@ -30,8 +30,7 @@ ObjectTestHarness = Proc.new do end desc "rspecin'" - def rspec_method - end + def rspec_method; end end class TestJobManager |