Sha256: 665e47b7dd80aed02d26f02fb207cf803c0b4d05535f2812b9e138f9593dd5dd

Contents?: true

Size: 761 Bytes

Versions: 1

Compression:

Stored size: 761 Bytes

Contents

# test_structure.rb
# 12. April 2007
#

$:.unshift File.join(File.dirname(__FILE__),'..','lib')

begin
  require "rubygems"
  require "clothred"
rescue LoadError
  require "clothred"
end

require 'test/unit'

class TestClothRedStructures < Test::Unit::TestCase
 
  STRUCTURE_TEST = [
  ["<blockquote>blockquote</blockquote>","bq. blockquote"],
  ["<p>paragraph</p><p>another paragraph</p>", "paragraph\n\nanother paragraph\n\n"], 
  ["HTML page break<br>", "HTML page break\n"], ["XHTML page break<br />", "XHTML page break\n"]
  ]
  
  
  def test_structures
    STRUCTURE_TEST.each do |html, textile|
      test_html = ClothRed.new(html)
      result = test_html.to_textile
      assert_equal(textile,result)
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
ClothRed-0.3.1 test/test_structure.rb