summaryrefslogtreecommitdiff
path: root/spec/unit
diff options
context:
space:
mode:
authorLamont Granquist <454857+lamont-granquist@users.noreply.github.com>2021-09-23 11:44:44 -0700
committerGitHub <noreply@github.com>2021-09-23 11:44:44 -0700
commit2ebf3371e6caf688fa88f98ee372be79c0ccf8cb (patch)
tree202df0717fda995f67b27977e12cf2d1d1a3a9c7 /spec/unit
parent6679f97944df0a655baff5c2fa07337e2cff2709 (diff)
parent21a0f21a3231139ca4ca18f7bf4f0fd6f6bcd172 (diff)
downloadchef-2ebf3371e6caf688fa88f98ee372be79c0ccf8cb.tar.gz
Merge pull request #12084 from jasonwbarnett/rollback/archive_file-unit
Diffstat (limited to 'spec/unit')
-rw-r--r--spec/unit/resource/archive_file_spec.rb17
1 files changed, 14 insertions, 3 deletions
diff --git a/spec/unit/resource/archive_file_spec.rb b/spec/unit/resource/archive_file_spec.rb
index 67fb3dc635..88cbe94629 100644
--- a/spec/unit/resource/archive_file_spec.rb
+++ b/spec/unit/resource/archive_file_spec.rb
@@ -16,10 +16,21 @@
#
require "spec_helper"
-require "ffi-libarchive"
-# Excluding this test on Windows until CI issues can be addressed.
-describe Chef::Resource::ArchiveFile do
+begin
+ require "ffi-libarchive"
+rescue LoadError
+ module Archive
+ class Reader
+ def close; end
+ def each_entry; end
+ def extract(entry, flags = 0, destination: nil); end
+ end
+ end
+end
+
+# Exclude this test on platforms where ffi-libarchive loading is broken
+describe Chef::Resource::ArchiveFile, :libarchive_loading_broken do
let(:node) { Chef::Node.new }
let(:events) { Chef::EventDispatch::Dispatcher.new }
let(:run_context) { Chef::RunContext.new(node, {}, events) }