Skip to content

Commit

Permalink
Fixes occasional failures of tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Jason King committed Jul 24, 2014
1 parent 121a90b commit 96f84ae
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 0 deletions.
4 changes: 4 additions & 0 deletions test/central_directory_test.rb
Expand Up @@ -2,6 +2,10 @@

class ZipCentralDirectoryTest < MiniTest::Test

def teardown
::Zip.reset!
end

def test_read_from_stream
::File.open(TestZipFile::TEST_ZIP2.zip_name, "rb") {
|zipFile|
Expand Down
4 changes: 4 additions & 0 deletions test/entry_set_test.rb
Expand Up @@ -14,6 +14,10 @@ def setup
@zipEntrySet = ::Zip::EntrySet.new(ZIP_ENTRIES)
end

def teardown
::Zip.reset!
end

def test_include
assert(@zipEntrySet.include?(ZIP_ENTRIES.first))
assert(!@zipEntrySet.include?(::Zip::Entry.new("different.zip", "different", "aComment")))
Expand Down
4 changes: 4 additions & 0 deletions test/settings_test.rb
Expand Up @@ -13,6 +13,10 @@ def setup
File.delete(TEST_OUT_NAME) if File.exist? TEST_OUT_NAME
end

def teardown
::Zip.reset!
end

def open_zip(&aProc)
assert(aProc != nil)
::Zip::File.open(TestZipFile::TEST_ZIP4.zip_name, &aProc)
Expand Down
4 changes: 4 additions & 0 deletions test/zip64_full_test.rb
Expand Up @@ -8,6 +8,10 @@
# this test does not, of course, run with the normal unit tests! ;)

class Zip64FullTest < MiniTest::Test
def teardown
::Zip.reset!
end

def prepareTestFile(test_filename)
::File.delete(test_filename) if ::File.exist?(test_filename)
return test_filename
Expand Down

0 comments on commit 96f84ae

Please sign in to comment.