summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorLamont Granquist <lamont@scriptkiddie.org>2016-11-15 15:04:53 -0800
committerLamont Granquist <lamont@scriptkiddie.org>2016-12-06 13:08:26 -0800
commit2e92c709459dffef54f9d671e10ec9a949a94962 (patch)
tree7b24e597c763df50cf4459e7bfa9f8bb1a5014d9 /spec
parentdb85ca494a484024404f1090c493613cc9521662 (diff)
downloadchef-2e92c709459dffef54f9d671e10ec9a949a94962.tar.gz
fix Style/SelfAssignment
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
Diffstat (limited to 'spec')
-rw-r--r--spec/functional/resource/user/useradd_spec.rb2
-rw-r--r--spec/unit/decorator/lazy_spec.rb2
2 files changed, 2 insertions, 2 deletions
diff --git a/spec/functional/resource/user/useradd_spec.rb b/spec/functional/resource/user/useradd_spec.rb
index 874155c107..268ce5c9d2 100644
--- a/spec/functional/resource/user/useradd_spec.rb
+++ b/spec/functional/resource/user/useradd_spec.rb
@@ -119,7 +119,7 @@ describe Chef::Provider::User::Useradd, metadata do
break if status.exitstatus != 8
sleep 1
- max_retries = max_retries - 1
+ max_retries -= 1
rescue UserNotFound
break
end
diff --git a/spec/unit/decorator/lazy_spec.rb b/spec/unit/decorator/lazy_spec.rb
index 4ea8301b63..46c8955ae8 100644
--- a/spec/unit/decorator/lazy_spec.rb
+++ b/spec/unit/decorator/lazy_spec.rb
@@ -21,7 +21,7 @@ require "spec_helper"
describe Chef::Decorator::Lazy do
let(:decorator) do
@a = 0
- Chef::Decorator::Lazy.new { @a = @a + 1 }
+ Chef::Decorator::Lazy.new { @a += 1 }
end
it "decorates an object" do