diff --git a/test/read_dir_test.rb b/test/read_dir_test.rb index 878a91a..c3c86f7 100644 --- a/test/read_dir_test.rb +++ b/test/read_dir_test.rb @@ -32,6 +32,7 @@ require_relative 'test_helper' require 'tmpdir' +require 'os' require 'zip-container' class TestReadDir < Minitest::Test @@ -66,7 +67,11 @@ def test_verify_mimetype_directory # Check that a mimetype which is not readable does not verify. We have to # build this fixture programmatically as there's no way to add a file # without read permissions into git. + # + # Skip this test in non-POSIX environments. def test_verify_unreadable_mimetype + skip unless OS.posix? + Dir.mktmpdir do |dir| container = File.join(dir, 'unreadable.container') Dir.mkdir(container) diff --git a/zip-container.gemspec b/zip-container.gemspec index af40ddb..950b1ce 100644 --- a/zip-container.gemspec +++ b/zip-container.gemspec @@ -66,6 +66,7 @@ Gem::Specification.new do |s| s.add_runtime_dependency 'rubyzip', '~> 2.3' s.add_development_dependency 'minitest', '~> 5.22.2' + s.add_development_dependency 'os', '~> 1.1.4' s.add_development_dependency 'rake', '~> 13.0' s.add_development_dependency 'rdoc', '~> 6.4.0' s.add_development_dependency 'rubocop', '~> 1.50.0'