summaryrefslogtreecommitdiff
path: root/spec/support
diff options
context:
space:
mode:
authorLamont Granquist <lamont@scriptkiddie.org>2018-01-17 13:34:18 -0800
committerLamont Granquist <lamont@scriptkiddie.org>2018-01-17 13:34:18 -0800
commit746562d6358c27b838c95ea27b2a2bd82c03cefe (patch)
treebaa587f091d06c1385543bbde818970e5fee7b75 /spec/support
parentfcd8d778baeeb990a64fe9042164bbd3e1dd5269 (diff)
downloadchef-746562d6358c27b838c95ea27b2a2bd82c03cefe.tar.gz
prepping for rubocop 0.52.1lcg/rubocop-0.52.1
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
Diffstat (limited to 'spec/support')
-rw-r--r--spec/support/lib/chef/resource/one_two_three_four.rb2
-rw-r--r--spec/support/lib/chef/resource/zen_master.rb4
-rw-r--r--spec/support/mock/constant.rb2
3 files changed, 2 insertions, 6 deletions
diff --git a/spec/support/lib/chef/resource/one_two_three_four.rb b/spec/support/lib/chef/resource/one_two_three_four.rb
index ef03a1133e..4dcbf1e60b 100644
--- a/spec/support/lib/chef/resource/one_two_three_four.rb
+++ b/spec/support/lib/chef/resource/one_two_three_four.rb
@@ -21,8 +21,6 @@ class Chef
class OneTwoThreeFour < Chef::Resource
provides :one_two_three_four
- attr_reader :i_can_count
-
def i_can_count(tf)
@i_can_count = tf
end
diff --git a/spec/support/lib/chef/resource/zen_master.rb b/spec/support/lib/chef/resource/zen_master.rb
index 99d761c8cf..9d6e5d46f7 100644
--- a/spec/support/lib/chef/resource/zen_master.rb
+++ b/spec/support/lib/chef/resource/zen_master.rb
@@ -1,6 +1,6 @@
#
# Author:: Adam Jacob (<adam@chef.io>)
-# Copyright:: Copyright 2008-2016, Chef Software Inc.
+# Copyright:: Copyright 2008-2018, Chef Software Inc.
# License:: Apache License, Version 2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
@@ -25,8 +25,6 @@ class Chef
provides :zen_master
allowed_actions :win, :score
- attr_reader :peace
-
def peace(tf)
@peace = tf
end
diff --git a/spec/support/mock/constant.rb b/spec/support/mock/constant.rb
index 3a23b4d8d8..7acd02e9d7 100644
--- a/spec/support/mock/constant.rb
+++ b/spec/support/mock/constant.rb
@@ -15,7 +15,7 @@ def mock_constants(constants)
begin
yield
ensure
- constants.each do |constant, val|
+ constants.each_key do |constant|
source_object, const_name = parse_constant(constant)
with_warnings(nil) { source_object.const_set(const_name, saved_constants[constant]) }
end