diff options
Diffstat (limited to 'spec/support/chef_helpers.rb')
-rw-r--r-- | spec/support/chef_helpers.rb | 12 |
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 |