Sha256: 712fad5ede137b805783dd25c081bd1707b55f31a530b62945d66dcdcb7486b8

Contents?: true

Size: 713 Bytes

Versions: 4

Compression:

Stored size: 713 Bytes

Contents

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

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

class TestContentProcessorRedCloth < Test::Unit::TestCase

  include Test::WebsiteHelper

  def test_call
    @obj = Webgen::ContentProcessor::RedCloth.new
    context = Webgen::Context.new(:content => "h1. header\n\nthis\nis\nsome\ntext")
    assert_equal("<h1>header</h1>\n<p>this\nis\nsome\ntext</p>", @obj.call(context).content)

    context.content = "h1. header\n\nthis\nis\nsome\ntext"
    @website.config['contentprocessor.redcloth.hard_breaks'] = true
    assert_equal("<h1>header</h1>\n<p>this<br />\nis<br />\nsome<br />\ntext</p>", @obj.call(context).content)
  end

end

Version data entries

4 entries across 4 versions & 2 rubygems

Version Path
gettalong-webgen-0.5.8.20090507 test/test_contentprocessor_redcloth.rb
gettalong-webgen-0.5.9.20090620 test/test_contentprocessor_redcloth.rb
gettalong-webgen-0.5.9.20090626 test/test_contentprocessor_redcloth.rb
webgen-0.5.8 test/test_contentprocessor_redcloth.rb