diff options
Diffstat (limited to 'spec/unit')
-rw-r--r-- | spec/unit/resource/archive_file_spec.rb | 17 |
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) } |