summaryrefslogtreecommitdiff
path: root/spec/support
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/support
parent271d3e4f91e3d158c9112512ac75d0ca51fc928d (diff)
downloadchef-f17fc92d3b8400cc91bfd384c5bf39fd40bdf5b1.tar.gz
remove unused block argumentslcg/chefstyle-perf
Diffstat (limited to 'spec/support')
-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
4 files changed, 4 insertions, 4 deletions
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.