Skip to content

Commit

Permalink
without rubyzip, skip zip test (#714)
Browse files Browse the repository at this point in the history
  • Loading branch information
takahashim authored Dec 31, 2016
1 parent 3b21f14 commit 4744f93
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions test/test_zip_exporter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -73,17 +73,23 @@ def test_export_zipcmd
exporter.export_zip_extcmd(epubfile)
assert_true(File.exist?(epubfile))

File.open(epubfile) do |f|
::Zip::InputStream.open(f) do |fzip|
## get first entry
entry = fzip.get_next_entry
assert_equal "mimetype", entry.name
assert_equal "application/epub+zip", fzip.read
if defined?(Zip)
File.open(epubfile) do |f|
::Zip::InputStream.open(f) do |fzip|
## get first entry
entry = fzip.get_next_entry
assert_equal "mimetype", entry.name
assert_equal "application/epub+zip", fzip.read
end
end
end
end

def test_export_rubyzip
if !defined?(Zip)
## skip test
return
end
params = {"epubmaker"=>{}}
epubfile = File.join(@tmpdir, "test.epub")
exporter = ZipExporter.new(@epubdir, params)
Expand Down

0 comments on commit 4744f93

Please sign in to comment.