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.
@@ -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
@@ -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