1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
|
# encoding: utf-8
require 'test_helper'
class ErrorsTest < MiniTest::Unit::TestCase
def test_rescue_legacy_zip_error
raise ::Zip::Error
rescue ::Zip::ZipError
end
def test_rescue_legacy_zip_entry_exists_error
raise ::Zip::EntryExistsError
rescue ::Zip::ZipEntryExistsError
end
def test_rescue_legacy_zip_destination_file_exists_error
raise ::Zip::DestinationFileExistsError
rescue ::Zip::ZipDestinationFileExistsError
end
def test_rescue_legacy_zip_compression_method_error
raise ::Zip::CompressionMethodError
rescue ::Zip::ZipCompressionMethodError
end
def test_rescue_legacy_zip_entry_name_error
raise ::Zip::EntryNameError
rescue ::Zip::ZipEntryNameError
end
def test_rescue_legacy_zip_internal_error
raise ::Zip::InternalError
rescue ::Zip::ZipInternalError
end
end
|