Skip to content

Commit

Permalink
Skip certain tests in non-POSIX environments.
Browse files Browse the repository at this point in the history
  • Loading branch information
hainesr committed Feb 23, 2024
1 parent 2a21487 commit fac137a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions test/read_dir_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@

require_relative 'test_helper'
require 'tmpdir'
require 'os'
require 'zip-container'

class TestReadDir < Minitest::Test
Expand Down Expand Up @@ -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)
Expand Down
1 change: 1 addition & 0 deletions zip-container.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down

0 comments on commit fac137a

Please sign in to comment.