test/test_i18n.rb in review-1.0.0 vs test/test_i18n.rb in review-1.1.0

- old
+ new

@@ -1,9 +1,13 @@ # -*- coding: utf-8 -*- require 'test_helper' require 'review/i18n' +require 'review/compiler' +require 'review/book' +require 'review/htmlbuilder' + class I18nTest < Test::Unit::TestCase include ReVIEW def test_ja I18n.i18n "ja" @@ -37,11 +41,11 @@ end def test_htmlbuilder _setup_htmlbuilder @builder.headline(1,"test","this is test.") - assert_equal %Q|<h1 id="test"><a id="h1" />Chapter 1. this is test.</h1>\n|, @builder.raw_result + assert_equal %Q|<h1 id="test"><a id="h1"></a>Chapter 1. this is test.</h1>\n|, @builder.raw_result end def _setup_htmlbuilder I18n.i18n "en" @builder = HTMLBuilder.new() @@ -51,10 +55,10 @@ "outencoding" => "UTF-8", "stylesheet" => nil, # for HTMLBuilder } ReVIEW.book.param = @param @compiler = ReVIEW::Compiler.new(@builder) - @chapter = Chapter.new(nil, 1, '-', nil, StringIO.new) + @chapter = Book::Chapter.new(Book::Base.new(nil), 1, '-', nil, StringIO.new) location = Location.new(nil, nil) @builder.bind(@compiler, @chapter, location) end def teardown