summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorLamont Granquist <lamont@scriptkiddie.org>2016-02-23 11:36:29 -0800
committerLamont Granquist <lamont@scriptkiddie.org>2016-02-23 11:36:29 -0800
commitf17fc92d3b8400cc91bfd384c5bf39fd40bdf5b1 (patch)
treec034024fd7fd216dcc3dfd8f0d3fa95ced5a89f6 /spec
parent271d3e4f91e3d158c9112512ac75d0ca51fc928d (diff)
downloadchef-f17fc92d3b8400cc91bfd384c5bf39fd40bdf5b1.tar.gz
remove unused block argumentslcg/chefstyle-perf
Diffstat (limited to 'spec')
-rw-r--r--spec/functional/win32/versions_spec.rb2
-rw-r--r--spec/support/matchers/leak.rb2
-rw-r--r--spec/support/mock/constant.rb2
-rw-r--r--spec/support/mock/platform.rb2
-rw-r--r--spec/support/shared/integration/knife_support.rb2
-rw-r--r--spec/unit/chef_fs/parallelizer.rb2
-rw-r--r--spec/unit/dsl/resources_spec.rb2
7 files changed, 7 insertions, 7 deletions
diff --git a/spec/functional/win32/versions_spec.rb b/spec/functional/win32/versions_spec.rb
index 53fce39491..d6e840ed7f 100644
--- a/spec/functional/win32/versions_spec.rb
+++ b/spec/functional/win32/versions_spec.rb
@@ -50,7 +50,7 @@ describe "Chef::ReservedNames::Win32::Version", :windows_only, :not_supported_on
@version = Chef::ReservedNames::Win32::Version.new
end
- def for_each_windows_version(&block)
+ def for_each_windows_version
@version.methods.each do |method_name|
if Chef::ReservedNames::Win32::Version::WIN_VERSIONS.keys.find { |key| method_name.to_s == Chef::ReservedNames::Win32::Version.send(:method_name_from_marketing_name, key) }
yield method_name
diff --git a/spec/support/matchers/leak.rb b/spec/support/matchers/leak.rb
index f50a1bf5f7..5f22c1c151 100644
--- a/spec/support/matchers/leak.rb
+++ b/spec/support/matchers/leak.rb
@@ -20,7 +20,7 @@ module Matchers
module LeakBase
include RSpec::Matchers
- def initialize(opts = {}, &block)
+ def initialize(opts = {})
@warmup = opts[:warmup] || 5
@iterations = opts[:iterations] || 100
@variance = opts[:variance] || 5000
diff --git a/spec/support/mock/constant.rb b/spec/support/mock/constant.rb
index 942905144f..3a23b4d8d8 100644
--- a/spec/support/mock/constant.rb
+++ b/spec/support/mock/constant.rb
@@ -4,7 +4,7 @@
# http://missingbit.blogspot.com/2011/07/stubbing-constants-in-rspec_20.html
# http://digitaldumptruck.jotabout.com/?p=551
-def mock_constants(constants, &block)
+def mock_constants(constants)
saved_constants = {}
constants.each do |constant, val|
source_object, const_name = parse_constant(constant)
diff --git a/spec/support/mock/platform.rb b/spec/support/mock/platform.rb
index ef94678b64..c6670827f9 100644
--- a/spec/support/mock/platform.rb
+++ b/spec/support/mock/platform.rb
@@ -5,7 +5,7 @@
# 'i386-mingw32' (windows) or 'x86_64-darwin11.2.0' (unix). Usueful for
# testing code that mixes in platform specific modules like +Chef::Mixin::Securable+
# or +Chef::FileAccessControl+
-def platform_mock(platform = :unix, &block)
+def platform_mock(platform = :unix)
allow(ChefConfig).to receive(:windows?).and_return(platform == :windows ? true : false)
ENV["SYSTEMDRIVE"] = (platform == :windows ? "C:" : nil)
diff --git a/spec/support/shared/integration/knife_support.rb b/spec/support/shared/integration/knife_support.rb
index fe9c6f78a7..1e81cd115c 100644
--- a/spec/support/shared/integration/knife_support.rb
+++ b/spec/support/shared/integration/knife_support.rb
@@ -23,7 +23,7 @@ require "chef/log"
module KnifeSupport
DEBUG = ENV["DEBUG"]
- def knife(*args, &block)
+ def knife(*args)
# Allow knife('role from file roles/blah.json') rather than requiring the
# arguments to be split like knife('role', 'from', 'file', 'roles/blah.json')
# If any argument will have actual spaces in it, the long form is required.
diff --git a/spec/unit/chef_fs/parallelizer.rb b/spec/unit/chef_fs/parallelizer.rb
index 96b713b547..9de8077677 100644
--- a/spec/unit/chef_fs/parallelizer.rb
+++ b/spec/unit/chef_fs/parallelizer.rb
@@ -463,7 +463,7 @@ describe Chef::ChefFS::Parallelizer do
attr_reader :num_processed
- def each(&each_block)
+ def each
@values.each do |value|
@num_processed += 1
yield(value)
diff --git a/spec/unit/dsl/resources_spec.rb b/spec/unit/dsl/resources_spec.rb
index 53cd6fcdb1..dc05f8bcf4 100644
--- a/spec/unit/dsl/resources_spec.rb
+++ b/spec/unit/dsl/resources_spec.rb
@@ -25,7 +25,7 @@ describe Chef::DSL::Resources do
r = declared_resources
Class.new do
include Chef::DSL::Resources
- define_method(:declare_resource) do |dsl_name, name, _created_at, &_block|
+ define_method(:declare_resource) do |dsl_name, name, _created_at|
r << [dsl_name, name]
end
end