html-table 1.6.3 → 1.7.1
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.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data/{CHANGES.rdoc → CHANGES.md} +76 -68
- data/Gemfile +2 -0
- data/MANIFEST.md +57 -0
- data/{README.rdoc → README.md} +80 -71
- data/Rakefile +122 -146
- data/doc/attributes.md +160 -0
- data/doc/table.md +173 -0
- data/doc/table_body.md +9 -0
- data/doc/table_caption.md +10 -0
- data/doc/table_colgroup.md +8 -0
- data/doc/table_colgroup_col.md +7 -0
- data/doc/table_content.md +17 -0
- data/doc/table_foot.md +8 -0
- data/doc/table_head.md +10 -0
- data/doc/table_row.md +114 -0
- data/doc/table_row_data.md +100 -0
- data/doc/table_row_header.md +6 -0
- data/examples/simple1.rb +7 -5
- data/html-table.gemspec +16 -11
- data/lib/html/body.rb +9 -7
- data/lib/html/caption.rb +4 -2
- data/lib/html/col.rb +37 -34
- data/lib/html/colgroup.rb +90 -97
- data/lib/html/content.rb +3 -6
- data/lib/html/data.rb +3 -1
- data/lib/html/foot.rb +53 -45
- data/lib/html/head.rb +54 -47
- data/lib/html/header.rb +5 -3
- data/lib/html/mixin/attribute_handler.rb +59 -55
- data/lib/html/mixin/html_handler.rb +33 -35
- data/lib/html/mixin/strongtyping.rb +6 -6
- data/lib/html/mixin/tag_handler.rb +6 -2
- data/lib/html/row.rb +156 -183
- data/lib/html/table.rb +45 -45
- data/lib/html/tablesection.rb +51 -46
- data/spec/attribute_handler_spec.rb +374 -0
- data/spec/body_spec.rb +98 -0
- data/spec/caption_spec.rb +83 -0
- data/spec/colgroup_col_spec.rb +34 -0
- data/spec/colgroup_spec.rb +97 -0
- data/spec/data_spec.rb +88 -0
- data/spec/foot_spec.rb +116 -0
- data/spec/head_spec.rb +116 -0
- data/spec/header_spec.rb +85 -0
- data/spec/html_handler_spec.rb +35 -0
- data/spec/row_spec.rb +163 -0
- data/spec/table_spec.rb +186 -0
- data/spec/tablesection_spec.rb +36 -0
- data/spec/tag_handler_spec.rb +85 -0
- data.tar.gz.sig +0 -0
- metadata +118 -92
- metadata.gz.sig +0 -0
- data/MANIFEST.rdoc +0 -56
- data/doc/attributes.rdoc +0 -143
- data/doc/table.rdoc +0 -156
- data/doc/table_body.rdoc +0 -9
- data/doc/table_caption.rdoc +0 -9
- data/doc/table_colgroup.rdoc +0 -8
- data/doc/table_colgroup_col.rdoc +0 -9
- data/doc/table_content.rdoc +0 -15
- data/doc/table_foot.rdoc +0 -8
- data/doc/table_head.rdoc +0 -11
- data/doc/table_row.rdoc +0 -105
- data/doc/table_row_data.rdoc +0 -92
- data/doc/table_row_header.rdoc +0 -7
- 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_row.rb
DELETED
@@ -1,141 +0,0 @@
|
|
1
|
-
############################################
|
2
|
-
# test_row.rb
|
3
|
-
#
|
4
|
-
# Test suite for the Table::Row class
|
5
|
-
############################################
|
6
|
-
require 'test-unit'
|
7
|
-
require 'html/table'
|
8
|
-
include HTML
|
9
|
-
|
10
|
-
class TC_HTML_Table_Row < Test::Unit::TestCase
|
11
|
-
def setup
|
12
|
-
@trow = Table::Row.new
|
13
|
-
end
|
14
|
-
|
15
|
-
def test_constructor
|
16
|
-
assert_nothing_raised{ Table::Row.new }
|
17
|
-
assert_nothing_raised{ Table::Row.new("foo") }
|
18
|
-
assert_nothing_raised{ Table::Row.new(1) }
|
19
|
-
assert_nothing_raised{ Table::Row.new([1,2,3]) }
|
20
|
-
assert_nothing_raised{ Table::Row.new([[1,2,3],["foo","bar"]]) }
|
21
|
-
end
|
22
|
-
|
23
|
-
def test_basic
|
24
|
-
html = "<tr></tr>"
|
25
|
-
assert_equal(html,@trow.html.gsub(/\s+/,''))
|
26
|
-
end
|
27
|
-
|
28
|
-
def test_header
|
29
|
-
assert_respond_to(@trow, :header?)
|
30
|
-
assert_respond_to(@trow, :header=)
|
31
|
-
assert_nothing_raised{ @trow.header? }
|
32
|
-
assert_nothing_raised{ @trow.header = true }
|
33
|
-
end
|
34
|
-
|
35
|
-
def test_with_attributes
|
36
|
-
html = "<tr align='center'></tr>"
|
37
|
-
@trow.align = "center"
|
38
|
-
assert_equal(html, @trow.html.gsub(/\s{2,}|\n+/,''))
|
39
|
-
end
|
40
|
-
|
41
|
-
def test_index_assignment_constraints
|
42
|
-
assert_raises(ArgumentTypeError){ @trow[0] = "foo" }
|
43
|
-
assert_raises(ArgumentTypeError){ @trow[0] = 1 }
|
44
|
-
assert_raises(ArgumentTypeError){ @trow[0] = Table::Caption.new }
|
45
|
-
assert_nothing_raised{ @trow[0] = Table::Row::Data.new }
|
46
|
-
assert_nothing_raised{ @trow[0] = Table::Row::Header.new }
|
47
|
-
end
|
48
|
-
|
49
|
-
def test_push_constraints
|
50
|
-
assert_raises(ArgumentTypeError){ @trow.push(Table::Caption.new) }
|
51
|
-
assert_raises(ArgumentTypeError){ @trow.push(nil) }
|
52
|
-
assert_nothing_raised{ @trow.push("test") }
|
53
|
-
assert_nothing_raised{ @trow.push(7) }
|
54
|
-
assert_nothing_raised{ @trow.push(Table::Row::Data.new) }
|
55
|
-
assert_nothing_raised{ @trow.push(Table::Row::Header.new) }
|
56
|
-
end
|
57
|
-
|
58
|
-
# Test the '<<' method
|
59
|
-
def test_doubl_arrow_constraints
|
60
|
-
assert_raises(ArgumentTypeError){ @trow << Table::Caption.new }
|
61
|
-
assert_nothing_raised{ @trow << "test" }
|
62
|
-
assert_nothing_raised{ @trow << "test" << "foo" }
|
63
|
-
assert_nothing_raised{ @trow << Table::Row::Data.new }
|
64
|
-
assert_nothing_raised{ @trow << Table::Row::Header.new }
|
65
|
-
end
|
66
|
-
|
67
|
-
def test_header_in_constructor
|
68
|
-
assert_nothing_raised{ @trow = Table::Row.new('test', true) }
|
69
|
-
html = "<tr><th>test</th></tr>"
|
70
|
-
assert_equal(html, @trow.html.gsub(/\s+/,''))
|
71
|
-
end
|
72
|
-
|
73
|
-
def test_push_single_data_element
|
74
|
-
html = "<tr><td>hello</td></tr>"
|
75
|
-
@trow.push Table::Row::Data.new{ |d| d.content = "hello" }
|
76
|
-
assert_equal(html, @trow.html.gsub(/\s{2,}|\n+/,''))
|
77
|
-
end
|
78
|
-
|
79
|
-
def test_push_multiple_data_element
|
80
|
-
html = "<tr><td>hello</td><td>world</td></tr>"
|
81
|
-
d1 = Table::Row::Data.new{ |d| d.content = "hello" }
|
82
|
-
d2 = Table::Row::Data.new{ |d| d.content = "world" }
|
83
|
-
@trow.push d1, d2
|
84
|
-
assert_equal(html, @trow.html.gsub(/\s{2,}|\n+/,''))
|
85
|
-
end
|
86
|
-
|
87
|
-
def test_add_content_directly
|
88
|
-
html = "<tr><td>hello</td><td>world</td></tr>"
|
89
|
-
@trow.content = "hello","world"
|
90
|
-
assert_equal(html, @trow.html.gsub(/\s{2,}|\n+/,''))
|
91
|
-
end
|
92
|
-
|
93
|
-
def test_add_content_in_constructor
|
94
|
-
html = "<tr><td>hello</td><td>world</td></tr>"
|
95
|
-
@trow = Table::Row.new(%w/hello world/)
|
96
|
-
assert_equal(html, @trow.html.gsub(/\s{2,}|\n+/,''))
|
97
|
-
end
|
98
|
-
|
99
|
-
def test_configure_column
|
100
|
-
html = "<tr><td>hello</td><td abbr='test' width=3 nowrap>world</td></tr>"
|
101
|
-
@trow.content = "hello","world"
|
102
|
-
@trow.configure(1){ |d|
|
103
|
-
d.abbr = 'test'
|
104
|
-
d.width = 3
|
105
|
-
d.nowrap = true
|
106
|
-
}
|
107
|
-
assert_equal(html, @trow.html.gsub(/\s{2,}|\n+/,''))
|
108
|
-
end
|
109
|
-
|
110
|
-
def test_unshift_constraints
|
111
|
-
assert_raises(ArgumentTypeError){ @trow.unshift(Table::Caption.new) }
|
112
|
-
assert_raises(ArgumentTypeError){ @trow.unshift(nil) }
|
113
|
-
assert_nothing_raised{ @trow.unshift("test") }
|
114
|
-
assert_nothing_raised{ @trow.unshift(7) }
|
115
|
-
assert_nothing_raised{ @trow.unshift(Table::Row::Data.new) }
|
116
|
-
assert_nothing_raised{ @trow.unshift(Table::Row::Header.new) }
|
117
|
-
end
|
118
|
-
|
119
|
-
def test_configure_error
|
120
|
-
assert_raises(ArgumentError){ @trow.configure(0,0){ } }
|
121
|
-
end
|
122
|
-
|
123
|
-
def test_indent_level
|
124
|
-
assert_respond_to(Table::Row,:indent_level)
|
125
|
-
assert_respond_to(Table::Row,:indent_level=)
|
126
|
-
assert_raises(ArgumentTypeError){ Table::Row.indent_level = "foo" }
|
127
|
-
assert_nothing_raised{ Table::Row.indent_level = 3 }
|
128
|
-
end
|
129
|
-
|
130
|
-
def test_end_tags
|
131
|
-
assert_respond_to(Table::Row,:end_tags?)
|
132
|
-
assert_respond_to(Table::Row,:end_tags=)
|
133
|
-
assert_raises(ArgumentTypeError){ Table::Row.end_tags = "foo" }
|
134
|
-
assert_raises(ArgumentTypeError){ Table::Row.end_tags = 1 }
|
135
|
-
assert_nothing_raised{ Table::Row.end_tags = true }
|
136
|
-
end
|
137
|
-
|
138
|
-
def teardown
|
139
|
-
@trow = nil
|
140
|
-
end
|
141
|
-
end
|
data/test/test_table.rb
DELETED
@@ -1,159 +0,0 @@
|
|
1
|
-
#######################################################################
|
2
|
-
# test_table.rb
|
3
|
-
#
|
4
|
-
# Test suite for the HTML::Table class. This test case should be run
|
5
|
-
# via the 'rake test' task.
|
6
|
-
#######################################################################
|
7
|
-
require 'test-unit'
|
8
|
-
require 'html/table'
|
9
|
-
require 'strongtyping'
|
10
|
-
include StrongTyping
|
11
|
-
include HTML
|
12
|
-
|
13
|
-
class TC_HTML_Table < Test::Unit::TestCase
|
14
|
-
def setup
|
15
|
-
@table = Table.new
|
16
|
-
end
|
17
|
-
|
18
|
-
def test_version
|
19
|
-
assert_equal('1.6.3', Table::VERSION)
|
20
|
-
assert_true(Table::VERSION.frozen?)
|
21
|
-
end
|
22
|
-
|
23
|
-
def test_constructor
|
24
|
-
assert_nothing_raised{ Table.new }
|
25
|
-
assert_nothing_raised{ Table.new('foo') }
|
26
|
-
assert_nothing_raised{ Table.new(1) }
|
27
|
-
assert_nothing_raised{ Table.new(%w/foo bar baz/) }
|
28
|
-
assert_nothing_raised{ Table.new([1,2,3]) }
|
29
|
-
assert_nothing_raised{ Table.new([[1,2,3],['foo','bar']]) }
|
30
|
-
end
|
31
|
-
|
32
|
-
def test_constructor_with_attributes
|
33
|
-
assert_nothing_raised{ Table.new(%w[foo bar baz], :border => 1) }
|
34
|
-
end
|
35
|
-
|
36
|
-
def test_html_case
|
37
|
-
assert_respond_to(Table, :html_case)
|
38
|
-
assert_respond_to(Table, :html_case=)
|
39
|
-
assert_nothing_raised{ Table.html_case = 'upper' }
|
40
|
-
assert_nothing_raised{ Table.html_case = 'lower' }
|
41
|
-
assert_raises(ArgumentError){ Table.html_case = 'foo' }
|
42
|
-
assert_raises(ArgumentTypeError){ Table.html_case = 7 }
|
43
|
-
end
|
44
|
-
|
45
|
-
def test_indent_level
|
46
|
-
assert_respond_to(Table, :indent_level)
|
47
|
-
assert_respond_to(Table, :indent_level=)
|
48
|
-
assert_nothing_raised{ Table.indent_level = 0 }
|
49
|
-
assert_raises(ArgumentTypeError){ Table.indent_level = 'foo' }
|
50
|
-
end
|
51
|
-
|
52
|
-
def test_index
|
53
|
-
assert_raises(ArgumentTypeError){ @table[0] = 'foo' }
|
54
|
-
end
|
55
|
-
|
56
|
-
def test_caption_index_constraints
|
57
|
-
assert_nothing_raised{ @table[0] = Table::Caption.new }
|
58
|
-
assert_raises(ArgumentError){ @table[1] = Table::Caption.new }
|
59
|
-
end
|
60
|
-
|
61
|
-
def test_head_index_constraints
|
62
|
-
assert_nothing_raised{ @table[0] = Table::Head.create }
|
63
|
-
assert_raises(ArgumentError){ @table[1] = Table::Head.create }
|
64
|
-
assert_raises(ArgumentError){ @table[2] = Table::Head.create }
|
65
|
-
end
|
66
|
-
|
67
|
-
def test_foot_index_constraints
|
68
|
-
assert_nothing_raised{
|
69
|
-
@table[0] = Table::Caption.new
|
70
|
-
@table[-1] = Table::Foot.create
|
71
|
-
}
|
72
|
-
assert_raises(ArgumentError){ @table[0] = Table::Foot.create }
|
73
|
-
end
|
74
|
-
|
75
|
-
def test_unshift_constraints
|
76
|
-
assert_nothing_raised{ @table.unshift Table::Row.new }
|
77
|
-
assert_raises(ArgumentTypeError){ @table.unshift Table::Row::Data.new }
|
78
|
-
assert_raises(ArgumentTypeError){ @table.unshift 'foo' }
|
79
|
-
end
|
80
|
-
|
81
|
-
def test_push_constraints
|
82
|
-
assert_nothing_raised{ @table.push Table::Row.new }
|
83
|
-
assert_raises(ArgumentTypeError){ @table.push('foo') }
|
84
|
-
assert_raises(ArgumentTypeError){ @table.push(7) }
|
85
|
-
assert_raises(ArgumentTypeError){ @table.push(nil) }
|
86
|
-
end
|
87
|
-
|
88
|
-
def test_double_arrow_constraints
|
89
|
-
assert_nothing_raised{ @table << Table::Row.new }
|
90
|
-
assert_nothing_raised{ @table << Table::Row.new << Table::Row.new }
|
91
|
-
assert_raises(ArgumentTypeError){ @table << 'foo' }
|
92
|
-
assert_raises(ArgumentTypeError){ @table << 7 }
|
93
|
-
assert_raises(ArgumentTypeError){ @table << nil }
|
94
|
-
end
|
95
|
-
|
96
|
-
def test_basic
|
97
|
-
html = "<table>\n</table>"
|
98
|
-
assert_equal(html, @table.html)
|
99
|
-
end
|
100
|
-
|
101
|
-
def test_with_attributes
|
102
|
-
html = "<table border=1 align='left' nowrap>\n</table>"
|
103
|
-
@table.border = 1
|
104
|
-
@table.align = 'left'
|
105
|
-
@table.nowrap = true
|
106
|
-
assert_equal(html, @table.html)
|
107
|
-
end
|
108
|
-
|
109
|
-
def test_add_row_push
|
110
|
-
html = '<table><tr></tr></table>'
|
111
|
-
@table.push(Table::Row.new)
|
112
|
-
assert_equal(html, @table.html.gsub(/\s+/,''))
|
113
|
-
end
|
114
|
-
|
115
|
-
def test_add_row_by_index
|
116
|
-
html = '<table><tr></tr></table>'
|
117
|
-
@table[0] = Table::Row.new
|
118
|
-
assert_equal(html, @table.html.gsub(/\s+/,''))
|
119
|
-
end
|
120
|
-
|
121
|
-
def test_add_multiple_rows
|
122
|
-
html = '<table><tr></tr><tr></tr></table>'
|
123
|
-
@table.push Table::Row.new, Table::Row.new
|
124
|
-
assert_equal(html, @table.html.gsub(/\s+/,''))
|
125
|
-
end
|
126
|
-
|
127
|
-
def test_add_single_data_element
|
128
|
-
html = '<table><tr><td>hello</td></tr></table>'
|
129
|
-
@table.content = 'hello'
|
130
|
-
assert_equal(html, @table.html.gsub(/\s+/,''))
|
131
|
-
end
|
132
|
-
|
133
|
-
def test_add_multiple_data_elements
|
134
|
-
html = '<table><tr><td>hello</td></tr><tr><td>world</td></tr></table>'
|
135
|
-
@table.content = 'hello','world'
|
136
|
-
assert_equal(html, @table.html.gsub(/\s+/,''))
|
137
|
-
end
|
138
|
-
|
139
|
-
def test_configure_row
|
140
|
-
html = "<table><tr align='center'><td bgcolor='red'>hello</td></tr>"
|
141
|
-
html << '</table>'
|
142
|
-
@table.push Table::Row::Data.new{ |d| d.content = 'hello' }
|
143
|
-
@table.configure(0){ |t| t.align = 'center' }
|
144
|
-
@table.configure(0,0){ |d| d.bgcolor = 'red' }
|
145
|
-
assert_equal(html, @table.html.gsub(/\s{2,}|\n+/,''))
|
146
|
-
end
|
147
|
-
|
148
|
-
def test_global_end_tags
|
149
|
-
assert_respond_to(Table,:global_end_tags?)
|
150
|
-
assert_respond_to(Table,:global_end_tags=)
|
151
|
-
assert_nothing_raised{ Table.global_end_tags = false }
|
152
|
-
assert_nothing_raised{ Table.global_end_tags = true }
|
153
|
-
assert_raises(ArgumentTypeError){ Table.global_end_tags = 'foo' }
|
154
|
-
end
|
155
|
-
|
156
|
-
def teardown
|
157
|
-
@table = nil
|
158
|
-
end
|
159
|
-
end
|
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
|