Sha256: 4d95dcf314b039a36bb563c709dc5dbebf7b67fd17a3b1a054c11f506ffecb6b

Contents?: true

Size: 481 Bytes

Versions: 5

Compression:

Stored size: 481 Bytes

Contents

require File.expand_path('helper', File.dirname(__FILE__))
require 'epub/parser/content_document'

class TestParserContentDocument < Test::Unit::TestCase
  def setup
    @dir = 'test/fixtures/book'
    @parser = EPUB::Parser::ContentDocument.new @dir
  end

  def test_parse_navigations
    doc = Nokogiri.XML open("#{@dir}/OPS/nav.xhtml")
    navs = @parser.parse_navigations doc

    assert_equal 1, navs.length
    assert_equal 'Table of Contents', navs.first.heading
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
epub-parser-0.0.9.4 test/test_parser_content_document.rb
epub-parser-0.0.9.3 test/test_parser_content_document.rb
epub-parser-0.0.9.2 test/test_parser_content_document.rb
epub-parser-0.0.9.1 test/test_parser_content_document.rb
epub-parser-0.0.9 test/test_parser_content_document.rb