Sha256: d25ac8798a7cca14e7135ae9a1e905aadd10d847ad97a5cfbe38fc33518f4e58

Contents?: true

Size: 729 Bytes

Versions: 13

Compression:

Stored size: 729 Bytes

Contents

# encoding: utf-8

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

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

  def test_builder_init_on_review_ext
    review_ext = <<-EOB
module ReVIEW
  class HTMLBuilder
    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)
      c = ReVIEW::Compiler.new(builder)
      assert_equal "test", builder.instance_eval{@builder_init_test}
    end
  end
end

Version data entries

13 entries across 13 versions & 2 rubygems

Version Path
review-1.7.2 test/test_review_ext.rb
review-1.7.1 test/test_review_ext.rb
review-peg-0.2.2 test/test_review_ext.rb
review-peg-0.2.1 test/test_review_ext.rb
review-peg-0.2.0 test/test_review_ext.rb
review-peg-0.1.3 test/test_review_ext.rb
review-peg-0.1.2 test/test_review_ext.rb
review-peg-0.1.1 test/test_review_ext.rb
review-peg-0.1.0 test/test_review_ext.rb
review-1.7.0 test/test_review_ext.rb
review-1.6.0 test/test_review_ext.rb
review-2.0.0.beta1 test/test_review_ext.rb
review-1.5.0 test/test_review_ext.rb