Sha256: 14a86c5426a4c0bf4a5bf54f191984b46e8d8c1a666eb7638ec71f97dbafbbc8

Contents?: true

Size: 679 Bytes

Versions: 5

Compression:

Stored size: 679 Bytes

Contents

# -*- encoding: utf-8 -*-

require 'test/unit'
require 'helper'
require 'webgen/tree'
require 'webgen/contentprocessor'

class TestContentProcessorRDoc < Test::Unit::TestCase

  def test_call
    obj = Webgen::ContentProcessor::RDoc.new
    root = Webgen::Node.new(Webgen::Tree.new.dummy_root, '/', '/')
    node = Webgen::Node.new(root, 'test', 'test')
    context = Webgen::Context.new(:content => "* hello",
                                                    :chain => [node])
    assert_equal("<ul>\n<li>hello\n\n</li>\n</ul>\n", obj.call(context).content)

    def obj.require(lib); raise LoadError; end
    assert_raise(Webgen::LoadError) { obj.call(context) }
  end

end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
webgen-0.5.13 test/test_contentprocessor_rdoc.rb
webgen-0.5.12 test/test_contentprocessor_rdoc.rb
webgen-0.5.11 test/test_contentprocessor_rdoc.rb
webgen-0.5.10 test/test_contentprocessor_rdoc.rb
webgen-0.5.9 test/test_contentprocessor_rdoc.rb