Sha256: 624da34dc0b5f3815effe7d58330a368006a77eaa3da0a236625d108c9f97733

Contents?: true

Size: 706 Bytes

Versions: 11

Compression:

Stored size: 706 Bytes

Contents

require 'test_helper'
require 'book_test_helper'
require 'review/compiler'
require 'review/htmlbuilder'

class ReviewExtTest < Test::Unit::TestCase
  include BookTestHelper

  def test_builder_init_on_review_ext
    review_ext = <<-EOB
module ReVIEW
  class HTMLBuilder
    attr_reader :builder_init_test
    def builder_init
      @builder_init_test = "test"
    end
  end
end
    EOB

    mktmpbookdir('CHAPS' => "ch01.re\n",
                 'ch01.re' => "= test\n\ntest.\n",
                 'review-ext.rb' => review_ext) do |_dir, _book, _files|
      builder = ReVIEW::HTMLBuilder.new(false)
      ReVIEW::Compiler.new(builder)
      assert_equal 'test', builder.builder_init_test
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
review-4.2.0 test/test_review_ext.rb
review-4.1.0 test/test_review_ext.rb
review-4.0.0 test/test_review_ext.rb
review-3.2.0 test/test_review_ext.rb
review-3.1.0 test/test_review_ext.rb
review-3.0.0 test/test_review_ext.rb
review-3.0.0.rc1 test/test_review_ext.rb
review-3.0.0.preview4 test/test_review_ext.rb
review-3.0.0.preview3 test/test_review_ext.rb
review-3.0.0.preview2 test/test_review_ext.rb
review-3.0.0.preview1 test/test_review_ext.rb