summaryrefslogtreecommitdiff
path: root/spec/support/chef_helpers.rb
diff options
context:
space:
mode:
authorLamont Granquist <lamont@scriptkiddie.org>2017-02-13 09:52:10 -0800
committerLamont Granquist <lamont@scriptkiddie.org>2017-02-13 09:52:10 -0800
commit404a9bc88be538769c6c80b3b31f39a6582991d2 (patch)
tree2f8795e5f64153440c22a522d669c235a627f289 /spec/support/chef_helpers.rb
parentb949a48acc21d4b64869bd7b834708d5232b1f2a (diff)
downloadchef-404a9bc88be538769c6c80b3b31f39a6582991d2.tar.gz
fix specs: RedundantReturn, RedundantSelf, RedundantBegin
department of redundancy department Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
Diffstat (limited to 'spec/support/chef_helpers.rb')
-rw-r--r--spec/support/chef_helpers.rb12
1 files changed, 5 insertions, 7 deletions
diff --git a/spec/support/chef_helpers.rb b/spec/support/chef_helpers.rb
index d0b5ad0bfd..444e5a30c8 100644
--- a/spec/support/chef_helpers.rb
+++ b/spec/support/chef_helpers.rb
@@ -53,13 +53,11 @@ end
# This is a temporary fix to get tests passing on systems that have no `diff`
# until we can replace shelling out to `diff` with ruby diff-lcs
def has_diff?
- begin
- diff_cmd = Mixlib::ShellOut.new("diff -v")
- diff_cmd.run_command
- true
- rescue Errno::ENOENT
- false
- end
+ diff_cmd = Mixlib::ShellOut.new("diff -v")
+ diff_cmd.run_command
+ true
+rescue Errno::ENOENT
+ false
end
# This is a helper to determine if the ruby in the PATH contains