diff options
author | Pete Higgins <pete@peterhiggins.org> | 2020-07-24 16:21:46 -0700 |
---|---|---|
committer | Pete Higgins <pete@peterhiggins.org> | 2020-07-24 16:21:46 -0700 |
commit | 436da53ad05567f00f833e7988a4afdb54ef515f (patch) | |
tree | b2d27f120916bcc3cd88df9184817af43db67020 | |
parent | 06e34d0d9cf2d0ad0e1dcae57c564ff8f623beb0 (diff) | |
download | chef-436da53ad05567f00f833e7988a4afdb54ef515f.tar.gz |
Remove unnecessary check for `diff`.
Signed-off-by: Pete Higgins <pete@peterhiggins.org>
-rw-r--r-- | spec/spec_helper.rb | 1 | ||||
-rw-r--r-- | spec/support/chef_helpers.rb | 11 | ||||
-rw-r--r-- | spec/unit/util/diff_spec.rb | 2 |
3 files changed, 1 insertions, 13 deletions
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 6c04291e89..91e0d31680 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -175,7 +175,6 @@ RSpec.configure do |config| config.filter_run_excluding requires_root: true unless root? config.filter_run_excluding requires_root_or_running_windows: true unless root? || windows? config.filter_run_excluding requires_unprivileged_user: true if root? - config.filter_run_excluding uses_diff: true unless has_diff? config.filter_run_excluding openssl_gte_101: true unless openssl_gte_101? config.filter_run_excluding openssl_lt_101: true unless openssl_lt_101? config.filter_run_excluding aes_256_gcm_only: true unless aes_256_gcm? diff --git a/spec/support/chef_helpers.rb b/spec/support/chef_helpers.rb index 1fdd24c033..05a0fea787 100644 --- a/spec/support/chef_helpers.rb +++ b/spec/support/chef_helpers.rb @@ -40,17 +40,6 @@ def make_tmpname(prefix_suffix, n = nil) path << suffix end -# NOTE: -# 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? - 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 # win32/service gem. windows_service_manager tests create a windows # service that starts with the system ruby and requires this gem. diff --git a/spec/unit/util/diff_spec.rb b/spec/unit/util/diff_spec.rb index 6ff2c0c6da..d1440dbaaa 100644 --- a/spec/unit/util/diff_spec.rb +++ b/spec/unit/util/diff_spec.rb @@ -532,7 +532,7 @@ shared_examples_for "a diff util" do end -describe Chef::Util::Diff, uses_diff: true do +describe Chef::Util::Diff do let!(:old_file) { old_tempfile.path } let!(:new_file) { new_tempfile.path } |