Sha256: 4be367b3bade56bdf90139df55aeb09308b0dfdc6dc9abc8e18a15f94e17fcd6
Contents?: true
Size: 805 Bytes
Versions: 3
Compression:
Stored size: 805 Bytes
Contents
# test_tables.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 TestClothRedTables < Test::Unit::TestCase TABLES_TEST = [ ["<table><tr><td>name</td><td>age</td><td>sex</td></tr><tr><td>joan</td><td>24</td><td>f</td></tr></table>", "|name|age|sex|\n|joan|24|f|\n"], ["<table><tr><th>name</th><th>age</th><th>sex</th></tr><tr><td>joan</td><td>24</td><td>f</td></tr></table>", "|_.name|_.age|_.sex|\n|joan|24|f|\n"] ] def test_entities TABLES_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
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
ClothRed-0.4.1 | test/test_tables.rb |
ClothRed-0.3.0 | test/test_tables.rb |
ClothRed-0.3.1 | test/test_tables.rb |