Sha256: 1b848a3a0ac1abef833e09ee9e11e7a0dcd8bbbca7f167bb173e425f5e53250a

Contents?: true

Size: 778 Bytes

Versions: 15

Compression:

Stored size: 778 Bytes

Contents

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

require 'webgen/test_helper'

class TestRedCloth < Minitest::Test

  include Webgen::TestHelper

  def test_static_call
    require 'webgen/content_processor/red_cloth' rescue skip('Library RedCloth not installed')
    setup_context
    @website.config['content_processor.redcloth.hard_breaks'] = false
    cp = Webgen::ContentProcessor::RedCloth

    @context.content = "h1. header\n\nthis\nis\nsome\ntext"
    assert_equal("<h1>header</h1>\n<p>this\nis\nsome\ntext</p>", cp.call(@context).content)

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

end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
webgen-1.7.3 test/webgen/content_processor/test_red_cloth.rb
webgen-1.7.2 test/webgen/content_processor/test_red_cloth.rb
webgen-1.7.1 test/webgen/content_processor/test_red_cloth.rb
webgen-1.7.0 test/webgen/content_processor/test_red_cloth.rb
webgen-1.6.0 test/webgen/content_processor/test_red_cloth.rb
webgen-1.5.2 test/webgen/content_processor/test_red_cloth.rb
webgen-1.5.1 test/webgen/content_processor/test_red_cloth.rb
webgen-1.5.0 test/webgen/content_processor/test_red_cloth.rb
webgen-1.4.1 test/webgen/content_processor/test_red_cloth.rb
webgen-1.4.0 test/webgen/content_processor/test_red_cloth.rb
webgen-1.3.0 test/webgen/content_processor/test_red_cloth.rb
webgen-1.2.1 test/webgen/content_processor/test_red_cloth.rb
webgen-1.2.0 test/webgen/content_processor/test_red_cloth.rb
webgen-1.1.0 test/webgen/content_processor/test_red_cloth.rb
webgen-1.0.0 test/webgen/content_processor/test_red_cloth.rb