html-table 1.3.1 → 1.3.2

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/test/tc_body.rb CHANGED
@@ -1,97 +1,87 @@
1
- ############################################
2
- # tc_body.rb
3
- #
4
- # Test suite for the Table::Body class
5
- ############################################
6
- base = File.basename(Dir.pwd)
7
-
8
- if base == "test" || base =~ /html-table/
9
- Dir.chdir("..") if base == "test"
10
- $LOAD_PATH.unshift(Dir.pwd)
11
- $LOAD_PATH.unshift(Dir.pwd + "/lib")
12
- $LOAD_PATH.unshift(Dir.pwd + "/lib/html")
13
- Dir.chdir("test") rescue nil
14
- end
15
-
16
- require "test/unit"
17
- require "html/table"
18
- include HTML
19
-
20
- class TC_HTML_Table_Body < Test::Unit::TestCase
21
- def setup
22
- @t = Table.new
23
- @tb = Table::Body.new
24
- end
25
-
26
- def test_constructor
27
- assert_nothing_raised{ Table::Body.new }
28
- assert_nothing_raised{ Table::Body.new("foo") }
29
- assert_nothing_raised{ Table::Body.new(1) }
30
- assert_nothing_raised{ Table::Body.new(%w/foo bar baz/) }
31
- assert_nothing_raised{ Table::Body.new([1,2,3]) }
32
- assert_nothing_raised{ Table::Body.new([[1,2,3],["foo","bar"]]) }
33
- end
34
-
35
- def test_basic
36
- html = "<tbody></tbody>"
37
- assert_equal(html,@tb.html.gsub(/\s{2,}|\n/,''))
38
- end
39
-
40
- def test_with_attributes
41
- html = "<tbody align='left' char='x'></tbody>"
42
- @tb.align = "left"
43
- @tb.char = 'x'
44
- assert_equal(html,@tb.html.gsub(/\s{2,}|\n/,''))
45
- end
46
-
47
- def test_push_single_row
48
- html = "<tbody><tr><td>test</td></tr></tbody>"
49
- @tb.push Table::Row.new{|r| r.content = "test"}
50
- assert_equal(html,@tb.html.gsub(/\s{2,}|\n/,''))
51
- end
52
-
53
- def test_push_multiple_rows
54
- html = "<tbody><tr><td>test</td></tr><tr><td>foo</td></tr></tbody>"
55
- r1 = Table::Row.new{|r| r.content = "test"}
56
- r2 = Table::Row.new{|r| r.content = "foo"}
57
- @tb.push r1, r2
58
- assert_equal(html,@tb.html.gsub(/\s{2,}|\n/,''))
59
- end
60
-
61
- def test_add_content_directly
62
- html = "<tbody><tr><td>hello</td><td>world</td></tr></tbody>"
63
- @tb.content = "hello","world"
64
- assert_equal(html,@tb.html.gsub(/\s{2,}|\n+/,''))
65
- end
66
-
67
- def test_add_content_in_constructor
68
- html = "<tbody><tr><td>hello</td><td>world</td></tr></tbody>"
69
- tb = Table::Body.new(%w/hello world/)
70
- assert_equal(html,tb.html.gsub(/\s{2,}|\n+/,''))
71
- end
72
-
73
- def test_configure_column
74
- html = "<tbody><tr><td>hello</td><td abbr='test' width=3 nowrap>world"
75
- html += "</td></tr></tbody>"
76
- @tb.content = "hello","world"
77
- @tb.configure(0,1){ |d|
78
- d.abbr = 'test'
79
- d.width = 3
80
- d.nowrap = true
81
- }
82
- assert_equal(html,@tb.html.gsub(/\s{2,}|\n+/,''))
83
- end
84
-
85
- def test_end_tags
86
- assert_respond_to(Table::Body,:end_tags?)
87
- assert_respond_to(Table::Body,:end_tags=)
88
- assert_raises(ArgumentTypeError){ Table::Body.end_tags = "foo" }
89
- assert_raises(ArgumentTypeError){ Table::Body.end_tags = 1 }
90
- assert_nothing_raised{ Table::Body.end_tags = true }
91
- end
92
-
93
- def teardown
94
- @t = nil
95
- @tb = nil
96
- end
97
- end
1
+ ############################################
2
+ # tc_body.rb
3
+ #
4
+ # Test suite for the Table::Body class
5
+ ############################################
6
+ require "test/unit"
7
+ require "html/table"
8
+ include HTML
9
+
10
+ class TC_HTML_Table_Body < Test::Unit::TestCase
11
+ def setup
12
+ @t = Table.new
13
+ @tb = Table::Body.new
14
+ end
15
+
16
+ def test_constructor
17
+ assert_nothing_raised{ Table::Body.new }
18
+ assert_nothing_raised{ Table::Body.new("foo") }
19
+ assert_nothing_raised{ Table::Body.new(1) }
20
+ assert_nothing_raised{ Table::Body.new(%w/foo bar baz/) }
21
+ assert_nothing_raised{ Table::Body.new([1,2,3]) }
22
+ assert_nothing_raised{ Table::Body.new([[1,2,3],["foo","bar"]]) }
23
+ end
24
+
25
+ def test_basic
26
+ html = "<tbody></tbody>"
27
+ assert_equal(html,@tb.html.gsub(/\s{2,}|\n/,''))
28
+ end
29
+
30
+ def test_with_attributes
31
+ html = "<tbody align='left' char='x'></tbody>"
32
+ @tb.align = "left"
33
+ @tb.char = 'x'
34
+ assert_equal(html,@tb.html.gsub(/\s{2,}|\n/,''))
35
+ end
36
+
37
+ def test_push_single_row
38
+ html = "<tbody><tr><td>test</td></tr></tbody>"
39
+ @tb.push Table::Row.new{|r| r.content = "test"}
40
+ assert_equal(html,@tb.html.gsub(/\s{2,}|\n/,''))
41
+ end
42
+
43
+ def test_push_multiple_rows
44
+ html = "<tbody><tr><td>test</td></tr><tr><td>foo</td></tr></tbody>"
45
+ r1 = Table::Row.new{|r| r.content = "test"}
46
+ r2 = Table::Row.new{|r| r.content = "foo"}
47
+ @tb.push r1, r2
48
+ assert_equal(html,@tb.html.gsub(/\s{2,}|\n/,''))
49
+ end
50
+
51
+ def test_add_content_directly
52
+ html = "<tbody><tr><td>hello</td><td>world</td></tr></tbody>"
53
+ @tb.content = "hello","world"
54
+ assert_equal(html,@tb.html.gsub(/\s{2,}|\n+/,''))
55
+ end
56
+
57
+ def test_add_content_in_constructor
58
+ html = "<tbody><tr><td>hello</td><td>world</td></tr></tbody>"
59
+ tb = Table::Body.new(%w/hello world/)
60
+ assert_equal(html,tb.html.gsub(/\s{2,}|\n+/,''))
61
+ end
62
+
63
+ def test_configure_column
64
+ html = "<tbody><tr><td>hello</td><td abbr='test' width=3 nowrap>world"
65
+ html += "</td></tr></tbody>"
66
+ @tb.content = "hello","world"
67
+ @tb.configure(0,1){ |d|
68
+ d.abbr = 'test'
69
+ d.width = 3
70
+ d.nowrap = true
71
+ }
72
+ assert_equal(html,@tb.html.gsub(/\s{2,}|\n+/,''))
73
+ end
74
+
75
+ def test_end_tags
76
+ assert_respond_to(Table::Body,:end_tags?)
77
+ assert_respond_to(Table::Body,:end_tags=)
78
+ assert_raises(ArgumentTypeError){ Table::Body.end_tags = "foo" }
79
+ assert_raises(ArgumentTypeError){ Table::Body.end_tags = 1 }
80
+ assert_nothing_raised{ Table::Body.end_tags = true }
81
+ end
82
+
83
+ def teardown
84
+ @t = nil
85
+ @tb = nil
86
+ end
87
+ end
data/test/tc_caption.rb CHANGED
@@ -1,90 +1,80 @@
1
- ################################################
2
- # tc_caption.rb
3
- #
4
- # Test suite for the Table::Caption class
5
- ################################################
6
- base = File.basename(Dir.pwd)
7
-
8
- if base == "test" || base =~ /html-table/
9
- Dir.chdir("..") if base == "test"
10
- $LOAD_PATH.unshift(Dir.pwd)
11
- $LOAD_PATH.unshift(Dir.pwd + "/lib")
12
- $LOAD_PATH.unshift(Dir.pwd + "/lib/html")
13
- Dir.chdir("test") rescue nil
14
- end
15
-
16
- require "test/unit"
17
- require "html/table"
18
- include HTML
19
-
20
- class TC_HTML_Table_Caption < Test::Unit::TestCase
21
- def setup
22
- @t = Table.new
23
- @tc = Table::Caption.new
24
- end
25
-
26
- def test_constructor
27
- assert_nothing_raised{ Table::Caption.new }
28
- assert_nothing_raised{ Table::Caption.new("foo") }
29
- assert_nothing_raised{ Table::Caption.new(1) }
30
- assert_nothing_raised{ Table::Caption.new(%w/foo bar baz/) }
31
- assert_nothing_raised{ Table::Caption.new([1,2,3]) }
32
- assert_nothing_raised{ Table::Caption.new([[1,2,3],["foo","bar"]]) }
33
- end
34
-
35
- def test_basic
36
- html = "<caption></caption>"
37
- assert_equal(html,@tc.html.gsub(/\s+/,''))
38
- end
39
-
40
- def test_with_attributes
41
- html = "<caption align='left' valign='top'></caption>"
42
- @tc.align = "left"
43
- @tc.valign = "top"
44
- assert_equal(html,@tc.html.gsub(/\s{2,}|\n+/,''))
45
- end
46
-
47
- def test_configure_not_allowed
48
- assert_raises(NoMethodError){ @tc.configure }
49
- end
50
-
51
- def test_add_content
52
- html = "<caption>hello world</caption>"
53
- @tc.content = "hello world"
54
- assert_equal(html,@tc.html.gsub(/\s{2,}/,''))
55
- end
56
-
57
- def test_add_multiple_content_items
58
- html = "<caption>hello world</caption>"
59
- @tc.content = "hello"," world"
60
- assert_equal(html,@tc.html.gsub(/\s{2,}/,''))
61
- end
62
-
63
- def test_add_content_in_constructor
64
- html = "<caption>hello world</caption>"
65
- tc = Table::Caption.new("hello world")
66
- assert_equal(html,tc.html.gsub(/\s{2,}/,''))
67
- end
68
-
69
- def test_indent_level
70
- assert_respond_to(Table::Caption,:indent_level)
71
- assert_respond_to(Table::Caption,:indent_level=)
72
- assert_raises(ArgumentTypeError){ Table::Caption.indent_level = "foo" }
73
- assert_nothing_raised{ Table::Caption.indent_level = 3 }
74
- end
75
-
76
- def test_only_row_zero
77
- assert_raises(ArgumentError){ @t[1] = @tc }
78
- end
79
-
80
- def test_automatically_set_to_row_zero
81
- @t.content = "hello","world"
82
- @t.push(@tc)
83
- assert_equal(true,@t[0].kind_of?(Table::Caption))
84
- end
85
-
86
- def teardown
87
- @t = nil
88
- @tc = nil
89
- end
90
- end
1
+ ################################################
2
+ # tc_caption.rb
3
+ #
4
+ # Test suite for the Table::Caption class
5
+ ################################################
6
+ require "test/unit"
7
+ require "html/table"
8
+ include HTML
9
+
10
+ class TC_HTML_Table_Caption < Test::Unit::TestCase
11
+ def setup
12
+ @t = Table.new
13
+ @tc = Table::Caption.new
14
+ end
15
+
16
+ def test_constructor
17
+ assert_nothing_raised{ Table::Caption.new }
18
+ assert_nothing_raised{ Table::Caption.new("foo") }
19
+ assert_nothing_raised{ Table::Caption.new(1) }
20
+ assert_nothing_raised{ Table::Caption.new(%w/foo bar baz/) }
21
+ assert_nothing_raised{ Table::Caption.new([1,2,3]) }
22
+ assert_nothing_raised{ Table::Caption.new([[1,2,3],["foo","bar"]]) }
23
+ end
24
+
25
+ def test_basic
26
+ html = "<caption></caption>"
27
+ assert_equal(html,@tc.html.gsub(/\s+/,''))
28
+ end
29
+
30
+ def test_with_attributes
31
+ html = "<caption align='left' valign='top'></caption>"
32
+ @tc.align = "left"
33
+ @tc.valign = "top"
34
+ assert_equal(html,@tc.html.gsub(/\s{2,}|\n+/,''))
35
+ end
36
+
37
+ def test_configure_not_allowed
38
+ assert_raises(NoMethodError){ @tc.configure }
39
+ end
40
+
41
+ def test_add_content
42
+ html = "<caption>hello world</caption>"
43
+ @tc.content = "hello world"
44
+ assert_equal(html,@tc.html.gsub(/\s{2,}/,''))
45
+ end
46
+
47
+ def test_add_multiple_content_items
48
+ html = "<caption>hello world</caption>"
49
+ @tc.content = "hello"," world"
50
+ assert_equal(html,@tc.html.gsub(/\s{2,}/,''))
51
+ end
52
+
53
+ def test_add_content_in_constructor
54
+ html = "<caption>hello world</caption>"
55
+ tc = Table::Caption.new("hello world")
56
+ assert_equal(html,tc.html.gsub(/\s{2,}/,''))
57
+ end
58
+
59
+ def test_indent_level
60
+ assert_respond_to(Table::Caption,:indent_level)
61
+ assert_respond_to(Table::Caption,:indent_level=)
62
+ assert_raises(ArgumentTypeError){ Table::Caption.indent_level = "foo" }
63
+ assert_nothing_raised{ Table::Caption.indent_level = 3 }
64
+ end
65
+
66
+ def test_only_row_zero
67
+ assert_raises(ArgumentError){ @t[1] = @tc }
68
+ end
69
+
70
+ def test_automatically_set_to_row_zero
71
+ @t.content = "hello","world"
72
+ @t.push(@tc)
73
+ assert_equal(true,@t[0].kind_of?(Table::Caption))
74
+ end
75
+
76
+ def teardown
77
+ @t = nil
78
+ @tc = nil
79
+ end
80
+ end
data/test/tc_col.rb CHANGED
@@ -1,50 +1,40 @@
1
- ##################################################
2
- # tc_col.rb
3
- #
4
- # Test suite for the Table::ColGroup::Col class
5
- ##################################################
6
- base = File.basename(Dir.pwd)
7
-
8
- if base == "test" || base =~ /html-table/
9
- Dir.chdir("..") if base == "test"
10
- $LOAD_PATH.unshift(Dir.pwd)
11
- $LOAD_PATH.unshift(Dir.pwd + "/lib")
12
- $LOAD_PATH.unshift(Dir.pwd + "/lib/html")
13
- Dir.chdir("test") rescue nil
14
- end
15
-
16
- require "test/unit"
17
- require "html/table"
18
- include HTML
19
-
20
- class TC_HTML_Table_Col < Test::Unit::TestCase
21
- def setup
22
- @c = Table::ColGroup::Col.new
23
- @cg = Table::ColGroup.new
24
- end
25
-
26
- def test_basic
27
- html = "<col>"
28
- assert_equal(html,@c.html.gsub(/\s{2,}|\n+/,''))
29
- end
30
-
31
- def test_no_configure
32
- assert_raises(NoMethodError){ @c.configure }
33
- end
34
-
35
- def test_no_content_allowed
36
- assert_raises(NoMethodError){ @c.content }
37
- assert_raises(NoMethodError){ @c.content = "foo" }
38
- end
39
-
40
- def test_indent_level
41
- assert_respond_to(Table::ColGroup::Col,:indent_level)
42
- assert_respond_to(Table::ColGroup::Col,:indent_level=)
43
- assert_raises(ArgumentTypeError){ Table::ColGroup::Col.indent_level = "foo" }
44
- assert_nothing_raised{ Table::ColGroup::Col.indent_level = 6 }
45
- end
46
-
47
- def teardown
48
- @c = nil
49
- end
50
- end
1
+ ##################################################
2
+ # tc_col.rb
3
+ #
4
+ # Test suite for the Table::ColGroup::Col class
5
+ ##################################################
6
+ require "test/unit"
7
+ require "html/table"
8
+ include HTML
9
+
10
+ class TC_HTML_Table_Col < Test::Unit::TestCase
11
+ def setup
12
+ @c = Table::ColGroup::Col.new
13
+ @cg = Table::ColGroup.new
14
+ end
15
+
16
+ def test_basic
17
+ html = "<col>"
18
+ assert_equal(html,@c.html.gsub(/\s{2,}|\n+/,''))
19
+ end
20
+
21
+ def test_no_configure
22
+ assert_raises(NoMethodError){ @c.configure }
23
+ end
24
+
25
+ def test_no_content_allowed
26
+ assert_raises(NoMethodError){ @c.content }
27
+ assert_raises(NoMethodError){ @c.content = "foo" }
28
+ end
29
+
30
+ def test_indent_level
31
+ assert_respond_to(Table::ColGroup::Col,:indent_level)
32
+ assert_respond_to(Table::ColGroup::Col,:indent_level=)
33
+ assert_raises(ArgumentTypeError){ Table::ColGroup::Col.indent_level = "foo" }
34
+ assert_nothing_raised{ Table::ColGroup::Col.indent_level = 6 }
35
+ end
36
+
37
+ def teardown
38
+ @c = nil
39
+ end
40
+ end
data/test/tc_colgroup.rb CHANGED
@@ -1,99 +1,89 @@
1
- ############################################
2
- # tc_colgroup.rb
3
- #
4
- # Test suite for the Table::ColGroup class
5
- ############################################
6
- base = File.basename(Dir.pwd)
7
-
8
- if base == "test" || base =~ /html-table/
9
- Dir.chdir("..") if base == "test"
10
- $LOAD_PATH.unshift(Dir.pwd)
11
- $LOAD_PATH.unshift(Dir.pwd + "/lib")
12
- $LOAD_PATH.unshift(Dir.pwd + "/lib/html")
13
- Dir.chdir("test") rescue nil
14
- end
15
-
16
- require "test/unit"
17
- require "html/table"
18
- include HTML
19
-
20
- class TC_HTML_Table_ColGroup < Test::Unit::TestCase
21
- def setup
22
- @cg = Table::ColGroup.new
23
- @col = Table::ColGroup::Col.new
24
- end
25
-
26
- def test_constructor
27
- assert_nothing_raised{ Table::ColGroup.new }
28
- assert_nothing_raised{ Table::ColGroup.new(@col) }
29
- assert_raises(TypeError){ Table::ColGroup.new("foo") }
30
- end
31
-
32
- def test_basic
33
- html = "<colgroup></colgroup>"
34
- assert_equal(html,@cg.html.gsub(/\s+/,''))
35
- end
36
-
37
- def test_with_attributes
38
- html = "<colgroup align='center' width='20%'></colgroup>"
39
- @cg.align = "center"
40
- @cg.width = "20%"
41
- assert_equal(html,@cg.html.gsub(/\s{2,}|\n+/,''))
42
- end
43
-
44
- def test_push_single_col_element
45
- html = "<colgroup><col></colgroup>"
46
- @cg.push(@col)
47
- assert_equal(html,@cg.html.gsub(/\s{2,}|\n+/,''))
48
- end
49
-
50
- def test_index_assignment_constraints
51
- assert_raises(ArgumentTypeError){ @cg[0] = "foo" }
52
- assert_raises(ArgumentTypeError){ @cg[0] = 1 }
53
- assert_raises(ArgumentTypeError){ @cg[1] = Table::Row.new }
54
- assert_nothing_raised{ @cg[0] = Table::ColGroup::Col.new }
55
- end
56
-
57
- def test_push_constraints
58
- assert_raises(TypeError){ @cg.push(7) }
59
- assert_raises(TypeError){ @cg.push("hello") }
60
- assert_raises(TypeError){ @cg.push(Table::Row.new) }
61
- assert_nothing_raised{ @cg.push(Table::ColGroup::Col.new) }
62
- end
63
-
64
- # Test '<<'
65
- def test_double_arrow_constraints
66
- assert_raises(TypeError){ @cg << 7 }
67
- assert_raises(TypeError){ @cg << "hello" }
68
- assert_raises(TypeError){ @cg << Table::Row.new }
69
- assert_nothing_raised{ @cg << Table::ColGroup::Col.new }
70
- end
71
-
72
- def test_configure_error
73
- assert_raises(ArgumentError){ @cg.configure(0,0){ } }
74
- end
75
-
76
- def test_content_error
77
- assert_raises(NoMethodError){ @cg.content }
78
- assert_raises(NoMethodError){ @cg.content = 'blah' }
79
- end
80
-
81
- def test_indent_level
82
- assert_respond_to(Table::ColGroup,:indent_level)
83
- assert_respond_to(Table::ColGroup,:indent_level=)
84
- assert_raises(ArgumentTypeError){ Table::ColGroup.indent_level = "foo" }
85
- assert_nothing_raised{ Table::ColGroup.indent_level = 6 }
86
- end
87
-
88
- def test_end_tags
89
- assert_respond_to(Table::ColGroup,:end_tags?)
90
- assert_respond_to(Table::ColGroup,:end_tags=)
91
- assert_raises(ArgumentTypeError){ Table::ColGroup.end_tags = "foo" }
92
- assert_raises(ArgumentTypeError){ Table::ColGroup.end_tags = 1 }
93
- assert_nothing_raised{ Table::ColGroup.end_tags = true }
94
- end
95
-
96
- def teardown
97
- @cg = nil
98
- end
99
- end
1
+ ############################################
2
+ # tc_colgroup.rb
3
+ #
4
+ # Test suite for the Table::ColGroup class
5
+ ############################################
6
+ require "test/unit"
7
+ require "html/table"
8
+ include HTML
9
+
10
+ class TC_HTML_Table_ColGroup < Test::Unit::TestCase
11
+ def setup
12
+ @cg = Table::ColGroup.new
13
+ @col = Table::ColGroup::Col.new
14
+ end
15
+
16
+ def test_constructor
17
+ assert_nothing_raised{ Table::ColGroup.new }
18
+ assert_nothing_raised{ Table::ColGroup.new(@col) }
19
+ assert_raises(TypeError){ Table::ColGroup.new("foo") }
20
+ end
21
+
22
+ def test_basic
23
+ html = "<colgroup></colgroup>"
24
+ assert_equal(html,@cg.html.gsub(/\s+/,''))
25
+ end
26
+
27
+ def test_with_attributes
28
+ html = "<colgroup align='center' width='20%'></colgroup>"
29
+ @cg.align = "center"
30
+ @cg.width = "20%"
31
+ assert_equal(html,@cg.html.gsub(/\s{2,}|\n+/,''))
32
+ end
33
+
34
+ def test_push_single_col_element
35
+ html = "<colgroup><col></colgroup>"
36
+ @cg.push(@col)
37
+ assert_equal(html,@cg.html.gsub(/\s{2,}|\n+/,''))
38
+ end
39
+
40
+ def test_index_assignment_constraints
41
+ assert_raises(ArgumentTypeError){ @cg[0] = "foo" }
42
+ assert_raises(ArgumentTypeError){ @cg[0] = 1 }
43
+ assert_raises(ArgumentTypeError){ @cg[1] = Table::Row.new }
44
+ assert_nothing_raised{ @cg[0] = Table::ColGroup::Col.new }
45
+ end
46
+
47
+ def test_push_constraints
48
+ assert_raises(TypeError){ @cg.push(7) }
49
+ assert_raises(TypeError){ @cg.push("hello") }
50
+ assert_raises(TypeError){ @cg.push(Table::Row.new) }
51
+ assert_nothing_raised{ @cg.push(Table::ColGroup::Col.new) }
52
+ end
53
+
54
+ # Test '<<'
55
+ def test_double_arrow_constraints
56
+ assert_raises(TypeError){ @cg << 7 }
57
+ assert_raises(TypeError){ @cg << "hello" }
58
+ assert_raises(TypeError){ @cg << Table::Row.new }
59
+ assert_nothing_raised{ @cg << Table::ColGroup::Col.new }
60
+ end
61
+
62
+ def test_configure_error
63
+ assert_raises(ArgumentError){ @cg.configure(0,0){ } }
64
+ end
65
+
66
+ def test_content_error
67
+ assert_raises(NoMethodError){ @cg.content }
68
+ assert_raises(NoMethodError){ @cg.content = 'blah' }
69
+ end
70
+
71
+ def test_indent_level
72
+ assert_respond_to(Table::ColGroup,:indent_level)
73
+ assert_respond_to(Table::ColGroup,:indent_level=)
74
+ assert_raises(ArgumentTypeError){ Table::ColGroup.indent_level = "foo" }
75
+ assert_nothing_raised{ Table::ColGroup.indent_level = 6 }
76
+ end
77
+
78
+ def test_end_tags
79
+ assert_respond_to(Table::ColGroup,:end_tags?)
80
+ assert_respond_to(Table::ColGroup,:end_tags=)
81
+ assert_raises(ArgumentTypeError){ Table::ColGroup.end_tags = "foo" }
82
+ assert_raises(ArgumentTypeError){ Table::ColGroup.end_tags = 1 }
83
+ assert_nothing_raised{ Table::ColGroup.end_tags = true }
84
+ end
85
+
86
+ def teardown
87
+ @cg = nil
88
+ end
89
+ end