test/test_publication.rb in epub-parser-0.3.4 vs test/test_publication.rb in epub-parser-0.3.5

- old
+ new

@@ -1,5 +1,6 @@ +# coding: utf-8 require_relative 'helper' require 'epub/publication' class TestPublication < Test::Unit::TestCase include EPUB::Publication @@ -299,11 +300,13 @@ def test_content_document_returns_navigation_document_when_nav item = EPUB::Publication::Package::Manifest::Item.new item.media_type = 'application/xhtml+xml' item.properties = %w[nav] + item.href = "nav.xhtml" stub(item).read {File.read(File.expand_path('../fixtures/book/OPS/nav.xhtml', __FILE__))} - stub(item).manifest.stub!.items {[]} + stub(item.manifest).items {[]} + stub(item.manifest).package.stub!.full_path {Addressable::URI.parse("OPS/ルートファイル.opf")} assert_instance_of EPUB::ContentDocument::Navigation, item.content_document end def test_can_refer_itemref_which_refers_self