html-table 1.3.2 → 1.3.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/CHANGES +13 -0
- data/MANIFEST +13 -13
- data/README +27 -26
- data/Rakefile +120 -2
- data/examples/advanced.rb +128 -0
- data/examples/intermediate1.rb +72 -0
- data/examples/intermediate2.rb +62 -0
- data/examples/intermediate3.rb +46 -0
- data/examples/simple1.rb +39 -0
- data/examples/simple2.rb +47 -0
- data/examples/simple3.rb +41 -0
- data/html-table.gemspec +5 -3
- data/lib/html/attribute_handler.rb +8 -16
- data/lib/html/table.rb +11 -4
- data/lib/html/tag_handler.rb +1 -3
- data/test/{tc_attribute_handler.rb → test_attribute_handler.rb} +110 -9
- data/test/{tc_body.rb → test_body.rb} +31 -28
- data/test/{tc_caption.rb → test_caption.rb} +26 -23
- data/test/{tc_col.rb → test_col.rb} +13 -10
- data/test/{tc_colgroup.rb → test_colgroup.rb} +29 -26
- data/test/{tc_data.rb → test_data.rb} +18 -15
- data/test/{tc_foot.rb → test_foot.rb} +34 -28
- data/test/{tc_head.rb → test_head.rb} +27 -24
- data/test/{tc_header.rb → test_header.rb} +20 -17
- data/test/test_html_handler.rb +40 -0
- data/test/test_row.rb +144 -0
- data/test/{tc_table.rb → test_table.rb} +47 -44
- data/test/{tc_tablesection.rb → test_tablesection.rb} +14 -11
- data/test/test_tag_handler.rb +93 -0
- metadata +61 -37
- data/html-table-1.3.2.gem +0 -0
- data/test/tc_html_handler.rb +0 -37
- data/test/tc_row.rb +0 -141
- data/test/tc_tag_handler.rb +0 -82
data/test/tc_tag_handler.rb
DELETED
@@ -1,82 +0,0 @@
|
|
1
|
-
############################################################################
|
2
|
-
# tc_tag_handler.rb
|
3
|
-
#
|
4
|
-
# Test suite for the TagHandler module. For these tests, we'll use an
|
5
|
-
# instance of the Table class where the module has been mixed in.
|
6
|
-
############################################################################
|
7
|
-
require 'test/unit'
|
8
|
-
require 'html/table'
|
9
|
-
include HTML
|
10
|
-
|
11
|
-
class TC_TagHandler < Test::Unit::TestCase
|
12
|
-
def setup
|
13
|
-
@content = Table::Content.new('test')
|
14
|
-
end
|
15
|
-
|
16
|
-
def test_bold
|
17
|
-
assert_respond_to(@content, :bold)
|
18
|
-
assert_respond_to(@content, :bold=)
|
19
|
-
assert_nothing_raised{ @content.bold }
|
20
|
-
assert_nothing_raised{ @content.bold = true }
|
21
|
-
end
|
22
|
-
|
23
|
-
def test_big
|
24
|
-
assert_respond_to(@content, :big)
|
25
|
-
assert_respond_to(@content, :big=)
|
26
|
-
assert_nothing_raised{ @content.big }
|
27
|
-
assert_nothing_raised{ @content.big = true }
|
28
|
-
end
|
29
|
-
|
30
|
-
def test_blink
|
31
|
-
assert_respond_to(@content, :blink)
|
32
|
-
assert_respond_to(@content, :blink=)
|
33
|
-
assert_nothing_raised{ @content.blink }
|
34
|
-
assert_nothing_raised{ @content.blink = true }
|
35
|
-
end
|
36
|
-
|
37
|
-
def test_italic
|
38
|
-
assert_respond_to(@content, :italic)
|
39
|
-
assert_respond_to(@content, :italic=)
|
40
|
-
assert_nothing_raised{ @content.italic }
|
41
|
-
assert_nothing_raised{ @content.italic = true }
|
42
|
-
end
|
43
|
-
|
44
|
-
def test_strike
|
45
|
-
assert_respond_to(@content, :strike)
|
46
|
-
assert_respond_to(@content, :strike=)
|
47
|
-
assert_nothing_raised{ @content.strike }
|
48
|
-
assert_nothing_raised{ @content.strike = true }
|
49
|
-
end
|
50
|
-
|
51
|
-
def test_sub
|
52
|
-
assert_respond_to(@content, :sub)
|
53
|
-
assert_respond_to(@content, :sub)
|
54
|
-
assert_nothing_raised{ @content.sub }
|
55
|
-
assert_nothing_raised{ @content.sub = true }
|
56
|
-
end
|
57
|
-
|
58
|
-
def test_sup
|
59
|
-
assert_respond_to(@content, :sup)
|
60
|
-
assert_respond_to(@content, :sup)
|
61
|
-
assert_nothing_raised{ @content.sup }
|
62
|
-
assert_nothing_raised{ @content.sup = true }
|
63
|
-
end
|
64
|
-
|
65
|
-
def test_tt
|
66
|
-
assert_respond_to(@content, :tt)
|
67
|
-
assert_respond_to(@content, :tt)
|
68
|
-
assert_nothing_raised{ @content.tt }
|
69
|
-
assert_nothing_raised{ @content.tt = true }
|
70
|
-
end
|
71
|
-
|
72
|
-
def test_underline
|
73
|
-
assert_respond_to(@content, :underline)
|
74
|
-
assert_respond_to(@content, :underline)
|
75
|
-
assert_nothing_raised{ @content.underline }
|
76
|
-
assert_nothing_raised{ @content.underline = true }
|
77
|
-
end
|
78
|
-
|
79
|
-
def teardown
|
80
|
-
@content = nil
|
81
|
-
end
|
82
|
-
end
|