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/unit | |
parent | f50ffe2b1b3b0afc7aa2b01a9356e439f78a5fcd (diff) | |
download | chef-1909f56148ce8f56777234d651dde1824f1017b0.tar.gz |
Style/EmptyMethod
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
Diffstat (limited to 'spec/unit')
-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 |
8 files changed, 12 insertions, 24 deletions
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 |