html-table 1.6.3 → 1.7.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/CHANGES.rdoc +4 -0
- data/Gemfile +7 -0
- data/MANIFEST.rdoc +18 -17
- data/Rakefile +117 -146
- data/html-table.gemspec +4 -4
- data/lib/html/mixin/attribute_handler.rb +2 -2
- data/lib/html/table.rb +1 -1
- data/spec/attribute_handler_spec.rb +360 -0
- data/spec/body_spec.rb +81 -0
- data/spec/caption_spec.rb +74 -0
- data/spec/colgroup_col_spec.rb +34 -0
- data/spec/colgroup_spec.rb +83 -0
- data/spec/data_spec.rb +72 -0
- data/spec/foot_spec.rb +104 -0
- data/spec/head_spec.rb +101 -0
- data/spec/header_spec.rb +72 -0
- data/spec/html_handler_spec.rb +32 -0
- data/spec/row_spec.rb +136 -0
- data/spec/table_spec.rb +152 -0
- data/spec/tablesection_spec.rb +36 -0
- data/spec/tag_handler_spec.rb +85 -0
- metadata +43 -42
- metadata.gz.sig +0 -0
- data/test/test_attribute_handler.rb +0 -361
- data/test/test_body.rb +0 -87
- data/test/test_caption.rb +0 -80
- data/test/test_col.rb +0 -40
- data/test/test_colgroup.rb +0 -89
- data/test/test_data.rb +0 -77
- data/test/test_foot.rb +0 -111
- data/test/test_head.rb +0 -104
- data/test/test_header.rb +0 -77
- data/test/test_html_handler.rb +0 -37
- data/test/test_row.rb +0 -141
- data/test/test_table.rb +0 -159
- data/test/test_tablesection.rb +0 -42
- data/test/test_tag_handler.rb +0 -90
data/test/test_tablesection.rb
DELETED
@@ -1,42 +0,0 @@
|
|
1
|
-
################################################
|
2
|
-
# test_tablesection.rb
|
3
|
-
#
|
4
|
-
# Test suite for the Table::TableSection class
|
5
|
-
################################################
|
6
|
-
require "test-unit"
|
7
|
-
require "html/table"
|
8
|
-
include HTML
|
9
|
-
|
10
|
-
class TC_HTML_Table_TableSection < Test::Unit::TestCase
|
11
|
-
def setup
|
12
|
-
@table = Table.new
|
13
|
-
@tsection = Table::TableSection.new
|
14
|
-
end
|
15
|
-
|
16
|
-
def test_indent_level
|
17
|
-
assert_respond_to(Table::Caption,:indent_level)
|
18
|
-
assert_respond_to(Table::Caption,:indent_level=)
|
19
|
-
assert_raises(ArgumentTypeError){ Table::Caption.indent_level = "foo" }
|
20
|
-
assert_nothing_raised{ Table::Caption.indent_level = 3 }
|
21
|
-
end
|
22
|
-
|
23
|
-
def test_indices
|
24
|
-
assert_raises(ArgumentTypeError){ @tsection[0] = "foo" }
|
25
|
-
assert_nothing_raised{ @tsection[0] = Table::Row.new }
|
26
|
-
end
|
27
|
-
|
28
|
-
def test_push
|
29
|
-
assert_raises(ArgumentTypeError){ @tsection.push("foo") }
|
30
|
-
assert_nothing_raised{ @tsection.push(Table::Row.new) }
|
31
|
-
end
|
32
|
-
|
33
|
-
def test_unshift
|
34
|
-
assert_raises(ArgumentTypeError){ @tsection.unshift("foo") }
|
35
|
-
assert_nothing_raised{ @tsection.unshift(Table::Row.new) }
|
36
|
-
end
|
37
|
-
|
38
|
-
def teardown
|
39
|
-
@table = nil
|
40
|
-
@tsection = nil
|
41
|
-
end
|
42
|
-
end
|
data/test/test_tag_handler.rb
DELETED
@@ -1,90 +0,0 @@
|
|
1
|
-
############################################################################
|
2
|
-
# test_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 self.startup
|
13
|
-
BlinkWarning.disable
|
14
|
-
end
|
15
|
-
|
16
|
-
def setup
|
17
|
-
@tcontent = Table::Content.new('test')
|
18
|
-
end
|
19
|
-
|
20
|
-
def test_bold
|
21
|
-
assert_respond_to(@tcontent, :bold)
|
22
|
-
assert_respond_to(@tcontent, :bold=)
|
23
|
-
assert_nothing_raised{ @tcontent.bold }
|
24
|
-
assert_nothing_raised{ @tcontent.bold = true }
|
25
|
-
end
|
26
|
-
|
27
|
-
def test_big
|
28
|
-
assert_respond_to(@tcontent, :big)
|
29
|
-
assert_respond_to(@tcontent, :big=)
|
30
|
-
assert_nothing_raised{ @tcontent.big }
|
31
|
-
assert_nothing_raised{ @tcontent.big = true }
|
32
|
-
end
|
33
|
-
|
34
|
-
def test_blink
|
35
|
-
assert_respond_to(@tcontent, :blink)
|
36
|
-
assert_respond_to(@tcontent, :blink=)
|
37
|
-
assert_nothing_raised{ @tcontent.blink }
|
38
|
-
assert_nothing_raised{ @tcontent.blink = true }
|
39
|
-
end
|
40
|
-
|
41
|
-
def test_italic
|
42
|
-
assert_respond_to(@tcontent, :italic)
|
43
|
-
assert_respond_to(@tcontent, :italic=)
|
44
|
-
assert_nothing_raised{ @tcontent.italic }
|
45
|
-
assert_nothing_raised{ @tcontent.italic = true }
|
46
|
-
end
|
47
|
-
|
48
|
-
def test_strike
|
49
|
-
assert_respond_to(@tcontent, :strike)
|
50
|
-
assert_respond_to(@tcontent, :strike=)
|
51
|
-
assert_nothing_raised{ @tcontent.strike }
|
52
|
-
assert_nothing_raised{ @tcontent.strike = true }
|
53
|
-
end
|
54
|
-
|
55
|
-
def test_sub
|
56
|
-
assert_respond_to(@tcontent, :sub)
|
57
|
-
assert_respond_to(@tcontent, :sub)
|
58
|
-
assert_nothing_raised{ @tcontent.sub }
|
59
|
-
assert_nothing_raised{ @tcontent.sub = true }
|
60
|
-
end
|
61
|
-
|
62
|
-
def test_sup
|
63
|
-
assert_respond_to(@tcontent, :sup)
|
64
|
-
assert_respond_to(@tcontent, :sup)
|
65
|
-
assert_nothing_raised{ @tcontent.sup }
|
66
|
-
assert_nothing_raised{ @tcontent.sup = true }
|
67
|
-
end
|
68
|
-
|
69
|
-
def test_tt
|
70
|
-
assert_respond_to(@tcontent, :tt)
|
71
|
-
assert_respond_to(@tcontent, :tt)
|
72
|
-
assert_nothing_raised{ @tcontent.tt }
|
73
|
-
assert_nothing_raised{ @tcontent.tt = true }
|
74
|
-
end
|
75
|
-
|
76
|
-
def test_underline
|
77
|
-
assert_respond_to(@tcontent, :underline)
|
78
|
-
assert_respond_to(@tcontent, :underline)
|
79
|
-
assert_nothing_raised{ @tcontent.underline }
|
80
|
-
assert_nothing_raised{ @tcontent.underline = true }
|
81
|
-
end
|
82
|
-
|
83
|
-
def teardown
|
84
|
-
@tcontent = nil
|
85
|
-
end
|
86
|
-
|
87
|
-
def self.shutdown
|
88
|
-
BlinkWarning.enable
|
89
|
-
end
|
90
|
-
end
|