test/tc_read_dir.rb in zip-container-2.2.0 vs test/tc_read_dir.rb in zip-container-3.0.0

- old
+ new

@@ -40,29 +40,32 @@ def test_verify_empty_directory assert_raise(ZipContainer::MalformedContainerError) do ZipContainer::Dir.verify!($dir_null) end - refute(ZipContainer::Dir.verify($dir_null)) + refute(ZipContainer::Dir.verify($dir_null).empty?) + refute(ZipContainer::Dir.verify?($dir_null)) end # Check that the empty container directory does verify. def test_verify_empty_container assert_nothing_raised(ZipContainer::MalformedContainerError) do ZipContainer::Dir.verify!($dir_empty) end - assert(ZipContainer::Dir.verify($dir_empty)) + assert(ZipContainer::Dir.verify($dir_empty).empty?) + assert(ZipContainer::Dir.verify?($dir_empty)) end # Check that a mimetype entry that is a directory does not verify. def test_verify_mimetype_directory assert_raise(ZipContainer::MalformedContainerError) do ZipContainer::Dir.verify!($dir_dir_mimetype) end - refute(ZipContainer::Dir.verify($dir_dir_mimetype)) + refute(ZipContainer::Dir.verify($dir_dir_mimetype).empty?) + refute(ZipContainer::Dir.verify?($dir_dir_mimetype)) end # 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. @@ -77,10 +80,11 @@ refute File.readable?(mime_path) assert_raise(ZipContainer::MalformedContainerError) do ZipContainer::Dir.verify!(container) end - refute(ZipContainer::Dir.verify(container)) + refute(ZipContainer::Dir.verify(container).empty?) + refute(ZipContainer::Dir.verify?(container)) end end end