Sha256: ec333848ae2942be5c0284249465328e2355902dea82bc069153c81eb8444043

Contents?: true

Size: 543 Bytes

Versions: 14

Compression:

Stored size: 543 Bytes

Contents

require_relative 'helper'
require 'epub/book'

class TestEUPB < Test::Unit::TestCase
  def setup
    @file = 'test/fixtures/book.epub'
  end

  def test_each_page_on_spine_returns_enumerator_when_block_not_given
    book = EPUB::Parser.parse(@file)
    assert_kind_of Enumerator, book.each_page_on_spine
  end

  def test_enumerator_each_page_on_spine_returns_yields_item
    enum = EPUB::Parser.parse(@file).each_page_on_spine
    enum.each do |entry|
      assert_kind_of EPUB::Publication::Package::Manifest::Item, entry
    end
  end
end

Version data entries

14 entries across 14 versions & 2 rubygems

Version Path
epub-parser-0.2.5 test/test_epub.rb
epub-parser-0.2.4 test/test_epub.rb
epub-parser-0.2.3 test/test_epub.rb
epub-parser-0.2.2 test/test_epub.rb
epub-parser-0.2.1 test/test_epub.rb
epub-parser-0.2.0 test/test_epub.rb
epub-parser-0.1.9 test/test_epub.rb
epub-parser-0.1.8 test/test_epub.rb
epub-parser-0.1.7.1 test/test_epub.rb
epub-parser-0.1.7 test/test_epub.rb
epub-parser-io-0.1.6b test/test_epub.rb
epub-parser-io-0.1.6a test/test_epub.rb
epub-parser-io-0.1.6 test/test_epub.rb
epub-parser-0.1.6 test/test_epub.rb