Sha256: c121db36fb8913c17401389a504a75e67b054aa61d42bfdacb873083c1b414bd

Contents?: true

Size: 632 Bytes

Versions: 8

Compression:

Stored size: 632 Bytes

Contents

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

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

class TestContentProcessorRDiscount < Test::Unit::TestCase

  def test_call
    @obj = Webgen::ContentProcessor::RDiscount.new
    node = Webgen::Node.new(Webgen::Node.new(Webgen::Tree.new.dummy_root, '/', '/'), 'test', 'test')
    context = Webgen::Context.new(:content => '# header', :chain => [node])
    assert_equal("<h1>header</h1>\n", @obj.call(context).content)

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

end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
webgen-0.5.17 test/test_contentprocessor_rdiscount.rb
webgen-0.5.15 test/test_contentprocessor_rdiscount.rb
webgen-0.5.14 test/test_contentprocessor_rdiscount.rb
webgen-0.5.13 test/test_contentprocessor_rdiscount.rb
webgen-0.5.12 test/test_contentprocessor_rdiscount.rb
webgen-0.5.11 test/test_contentprocessor_rdiscount.rb
webgen-0.5.10 test/test_contentprocessor_rdiscount.rb
webgen-0.5.9 test/test_contentprocessor_rdiscount.rb