openxml-docx 0.8.0 → 0.9.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/{example → examples/base} +1 -1
- data/examples/table +68 -0
- data/lib/openxml/docx/elements/grid_column.rb +12 -0
- data/lib/openxml/docx/elements/table.rb +30 -0
- data/lib/openxml/docx/elements/table_cell.rb +26 -0
- data/lib/openxml/docx/elements/table_grid.rb +10 -0
- data/lib/openxml/docx/elements/table_row.rb +36 -0
- data/lib/openxml/docx/package.rb +3 -0
- data/lib/openxml/docx/properties.rb +2 -0
- data/lib/openxml/docx/properties/base_property.rb +14 -0
- data/lib/openxml/docx/properties/cant_split.rb +8 -0
- data/lib/openxml/docx/properties/columns.rb +2 -0
- data/lib/openxml/docx/properties/grid_after.rb +8 -0
- data/lib/openxml/docx/properties/grid_before.rb +8 -0
- data/lib/openxml/docx/properties/grid_span.rb +8 -0
- data/lib/openxml/docx/properties/header.rb +8 -0
- data/lib/openxml/docx/properties/headers.rb +12 -0
- data/lib/openxml/docx/properties/hidden.rb +8 -0
- data/lib/openxml/docx/properties/hide_mark.rb +8 -0
- data/lib/openxml/docx/properties/no_wrap.rb +8 -0
- data/lib/openxml/docx/properties/table_border.rb +25 -0
- data/lib/openxml/docx/properties/table_borders.rb +13 -0
- data/lib/openxml/docx/properties/table_caption.rb +10 -0
- data/lib/openxml/docx/properties/table_cell_border.rb +25 -0
- data/lib/openxml/docx/properties/table_cell_borders.rb +13 -0
- data/lib/openxml/docx/properties/table_cell_cell_margin.rb +13 -0
- data/lib/openxml/docx/properties/table_cell_fit_text.rb +9 -0
- data/lib/openxml/docx/properties/table_cell_margin.rb +13 -0
- data/lib/openxml/docx/properties/table_cell_margins.rb +13 -0
- data/lib/openxml/docx/properties/table_cell_spacing.rb +13 -0
- data/lib/openxml/docx/properties/table_cell_width.rb +13 -0
- data/lib/openxml/docx/properties/table_description.rb +10 -0
- data/lib/openxml/docx/properties/table_header.rb +10 -0
- data/lib/openxml/docx/properties/table_indent.rb +13 -0
- data/lib/openxml/docx/properties/table_layout.rb +14 -0
- data/lib/openxml/docx/properties/table_look.rb +17 -0
- data/lib/openxml/docx/properties/table_overlap.rb +14 -0
- data/lib/openxml/docx/properties/table_p_pr.rb +41 -0
- data/lib/openxml/docx/properties/table_style.rb +10 -0
- data/lib/openxml/docx/properties/table_width.rb +13 -0
- data/lib/openxml/docx/properties/tr_height.rb +19 -0
- data/lib/openxml/docx/properties/valign.rb +13 -0
- data/lib/openxml/docx/properties/wafter.rb +12 -0
- data/lib/openxml/docx/properties/wbefore.rb +12 -0
- data/lib/openxml/docx/properties/width_property.rb +17 -0
- data/lib/openxml/docx/style.rb +17 -7
- data/lib/openxml/docx/version.rb +1 -1
- data/spec/elements/grid_column_spec.rb +15 -0
- data/spec/elements/table_cell_spec.rb +15 -0
- data/spec/elements/table_grid_spec.rb +17 -0
- data/spec/elements/table_row_spec.rb +18 -0
- data/spec/elements/table_spec.rb +21 -0
- data/spec/properties/border_spec.rb +21 -95
- data/spec/properties/cant_split_spec.rb +23 -0
- data/spec/properties/color_spec.rb +9 -29
- data/spec/properties/column_spec.rb +6 -22
- data/spec/properties/columns_spec.rb +4 -14
- data/spec/properties/conditional_formatting_spec.rb +12 -108
- data/spec/properties/document_grid_spec.rb +12 -53
- data/spec/properties/east_asian_layout_spec.rb +14 -74
- data/spec/properties/font_spec.rb +35 -238
- data/spec/properties/frame_spec.rb +48 -285
- data/spec/properties/grid_after_spec.rb +26 -0
- data/spec/properties/grid_before_spec.rb +26 -0
- data/spec/properties/grid_span_spec.rb +24 -0
- data/spec/properties/header_spec.rb +17 -0
- data/spec/properties/headers_spec.rb +39 -0
- data/spec/properties/hidden_spec.rb +23 -0
- data/spec/properties/hide_mark_spec.rb +23 -0
- data/spec/properties/indentation_spec.rb +32 -136
- data/spec/properties/language_spec.rb +3 -12
- data/spec/properties/latent_styles_exception_spec.rb +7 -22
- data/spec/properties/latent_styles_spec.rb +5 -18
- data/spec/properties/line_numbering_spec.rb +15 -68
- data/spec/properties/manual_width_spec.rb +8 -33
- data/spec/properties/no_wrap_spec.rb +23 -0
- data/spec/properties/numbering_spec.rb +4 -13
- data/spec/properties/page_margins_spec.rb +28 -114
- data/spec/properties/page_numbering_spec.rb +26 -367
- data/spec/properties/page_size_spec.rb +15 -62
- data/spec/properties/paper_source_spec.rb +8 -34
- data/spec/properties/shading_spec.rb +21 -92
- data/spec/properties/spacing_spec.rb +27 -119
- data/spec/properties/table_border_spec.rb +119 -0
- data/spec/properties/table_borders_spec.rb +41 -0
- data/spec/properties/table_caption_spec.rb +17 -0
- data/spec/properties/table_cell_border_spec.rb +119 -0
- data/spec/properties/table_cell_borders_spec.rb +40 -0
- data/spec/properties/table_cell_cell_margin_spec.rb +46 -0
- data/spec/properties/table_cell_fit_text.rb +23 -0
- data/spec/properties/table_cell_margin_spec.rb +40 -0
- data/spec/properties/table_cell_margins_spec.rb +46 -0
- data/spec/properties/table_cell_spacing_spec.rb +21 -0
- data/spec/properties/table_cell_width.rb +21 -0
- data/spec/properties/table_description_spec.rb +17 -0
- data/spec/properties/table_header_spec.rb +23 -0
- data/spec/properties/table_indent_spec.rb +43 -0
- data/spec/properties/table_layout_spec.rb +22 -0
- data/spec/properties/table_look_spec.rb +38 -0
- data/spec/properties/table_overlap_spec.rb +22 -0
- data/spec/properties/table_p_pr_spec.rb +68 -0
- data/spec/properties/table_row_height.rb +20 -0
- data/spec/properties/table_style_spec.rb +17 -0
- data/spec/properties/table_width_spec.rb +21 -0
- data/spec/properties/underline_spec.rb +14 -130
- data/spec/properties/valign_spec.rb +19 -0
- data/spec/properties/wafter_spec.rb +21 -0
- data/spec/properties/wbefore_spec.rb +21 -0
- data/spec/support/data/elements/grid_column_element.xml +4 -0
- data/spec/support/data/elements/table_cell_element.xml +8 -0
- data/spec/support/data/elements/table_element.xml +18 -0
- data/spec/support/data/elements/table_grid_element.xml +6 -0
- data/spec/support/data/elements/table_row_element.xml +13 -0
- data/spec/support/property_test_macros.rb +61 -0
- metadata +86 -3
@@ -6,65 +6,24 @@ describe OpenXml::Docx::Properties::DocumentGrid do
|
|
6
6
|
it_should_use tag: :docGrid, name: "document_grid"
|
7
7
|
|
8
8
|
for_attribute(:char_space) do
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
with_value(:twelve) do
|
15
|
-
it_should_raise_an_exception
|
16
|
-
end
|
17
|
-
|
18
|
-
with_value(-12345) do
|
19
|
-
it_should_assign_successfully
|
20
|
-
it_should_output "<w:docGrid w:charSpace=\"-12345\"/>"
|
21
|
-
end
|
22
|
-
|
23
|
-
with_value(123.45) do
|
24
|
-
it_should_raise_an_exception
|
25
|
-
end
|
9
|
+
values = [40960, -12345]
|
10
|
+
it_should_assign_and_output_xml values
|
11
|
+
it_should_not_allow_invalid_value
|
12
|
+
it_should_not_allow_floats
|
26
13
|
end
|
27
14
|
|
28
15
|
for_attribute(:line_pitch) do
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
with_value(:twelve) do
|
35
|
-
it_should_raise_an_exception
|
36
|
-
end
|
37
|
-
|
38
|
-
with_value(-12345) do
|
39
|
-
it_should_assign_successfully
|
40
|
-
it_should_output "<w:docGrid w:linePitch=\"-12345\"/>"
|
41
|
-
end
|
42
|
-
|
43
|
-
with_value(123.45) do
|
44
|
-
it_should_raise_an_exception
|
45
|
-
end
|
16
|
+
values = [40960, -12345]
|
17
|
+
it_should_assign_and_output_xml values
|
18
|
+
it_should_not_allow_invalid_value
|
19
|
+
it_should_not_allow_invalid_value
|
20
|
+
it_should_not_allow_floats
|
46
21
|
end
|
47
22
|
|
48
23
|
for_attribute(:type) do
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
end
|
53
|
-
|
54
|
-
with_value(:lines) do
|
55
|
-
it_should_assign_successfully
|
56
|
-
it_should_output "<w:docGrid w:type=\"lines\"/>"
|
57
|
-
end
|
58
|
-
|
59
|
-
with_value(:linesAndChars) do
|
60
|
-
it_should_assign_successfully
|
61
|
-
it_should_output "<w:docGrid w:type=\"linesAndChars\"/>"
|
62
|
-
end
|
63
|
-
|
64
|
-
with_value(:snapToChars) do
|
65
|
-
it_should_assign_successfully
|
66
|
-
it_should_output "<w:docGrid w:type=\"snapToChars\"/>"
|
67
|
-
end
|
24
|
+
values = %i(default lines linesAndChars snapToChars)
|
25
|
+
it_should_assign_and_output_xml values
|
26
|
+
it_should_not_allow_invalid_value
|
68
27
|
end
|
69
28
|
|
70
29
|
with_no_attributes_set do
|
@@ -16,92 +16,32 @@ describe OpenXml::Docx::Properties::EastAsianLayout do
|
|
16
16
|
it_should_output "<w:eastAsianLayout w:combine=\"off\"/>"
|
17
17
|
end
|
18
18
|
|
19
|
-
|
20
|
-
it_should_raise_an_exception
|
21
|
-
end
|
19
|
+
it_should_not_allow_invalid_value
|
22
20
|
end
|
23
21
|
|
24
22
|
for_attribute(:combine_brackets) do
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
end
|
29
|
-
|
30
|
-
with_value(:curly) do
|
31
|
-
it_should_assign_successfully
|
32
|
-
it_should_output "<w:eastAsianLayout w:combineBrackets=\"curly\"/>"
|
33
|
-
end
|
34
|
-
|
35
|
-
with_value(:none) do
|
36
|
-
it_should_assign_successfully
|
37
|
-
it_should_output "<w:eastAsianLayout w:combineBrackets=\"none\"/>"
|
38
|
-
end
|
39
|
-
|
40
|
-
with_value(:round) do
|
41
|
-
it_should_assign_successfully
|
42
|
-
it_should_output "<w:eastAsianLayout w:combineBrackets=\"round\"/>"
|
43
|
-
end
|
44
|
-
|
45
|
-
with_value(:square) do
|
46
|
-
it_should_assign_successfully
|
47
|
-
it_should_output "<w:eastAsianLayout w:combineBrackets=\"square\"/>"
|
48
|
-
end
|
49
|
-
|
50
|
-
with_value(:smileyFaces) do
|
51
|
-
it_should_raise_an_exception
|
52
|
-
end
|
23
|
+
values = %i(angle curly none round square)
|
24
|
+
it_should_assign_and_output_xml values
|
25
|
+
it_should_not_allow_invalid_value
|
53
26
|
end
|
54
27
|
|
55
28
|
for_attribute(:id) do
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
with_value(-81238123) do
|
62
|
-
it_should_assign_successfully
|
63
|
-
it_should_output "<w:eastAsianLayout w:id=\"-81238123\"/>"
|
64
|
-
end
|
65
|
-
|
66
|
-
with_value(4.5) do
|
67
|
-
it_should_raise_an_exception
|
68
|
-
end
|
69
|
-
|
70
|
-
with_value(:number1234) do
|
71
|
-
it_should_raise_an_exception
|
72
|
-
end
|
29
|
+
values = [1, -81238123]
|
30
|
+
it_should_assign_and_output_xml values
|
31
|
+
it_should_not_allow_floats
|
32
|
+
it_should_not_allow_invalid_value
|
73
33
|
end
|
74
34
|
|
75
35
|
for_attribute(:vertical) do
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
end
|
80
|
-
|
81
|
-
with_value(:off) do
|
82
|
-
it_should_assign_successfully
|
83
|
-
it_should_output "<w:eastAsianLayout w:vert=\"off\"/>"
|
84
|
-
end
|
85
|
-
|
86
|
-
with_value(:sorta) do
|
87
|
-
it_should_raise_an_exception
|
88
|
-
end
|
36
|
+
values = %i(on off)
|
37
|
+
it_should_assign_and_output_xml values
|
38
|
+
it_should_not_allow_invalid_value
|
89
39
|
end
|
90
40
|
|
91
41
|
for_attribute(:vertical_compress) do
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
end
|
96
|
-
|
97
|
-
with_value(:off) do
|
98
|
-
it_should_assign_successfully
|
99
|
-
it_should_output "<w:eastAsianLayout w:vertCompress=\"off\"/>"
|
100
|
-
end
|
101
|
-
|
102
|
-
with_value(:sorta) do
|
103
|
-
it_should_raise_an_exception
|
104
|
-
end
|
42
|
+
values = %i(on off)
|
43
|
+
it_should_assign_and_output_xml values
|
44
|
+
it_should_not_allow_invalid_value
|
105
45
|
end
|
106
46
|
|
107
47
|
with_no_attributes_set do
|
@@ -6,268 +6,65 @@ describe OpenXml::Docx::Properties::Font do
|
|
6
6
|
it_should_use tag: :rFonts, name: "font"
|
7
7
|
|
8
8
|
for_attribute(:ascii) do
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
end
|
13
|
-
|
14
|
-
with_value(1) do
|
15
|
-
it_should_raise_an_exception
|
16
|
-
end
|
17
|
-
|
18
|
-
with_value(:monospace) do
|
19
|
-
it_should_raise_an_exception
|
20
|
-
end
|
9
|
+
it_should_assign_and_output_xml "Courier New"
|
10
|
+
it_should_not_allow_integers
|
11
|
+
it_should_not_allow_invalid_value
|
21
12
|
end
|
22
13
|
|
23
14
|
for_attribute(:ascii_theme) do
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
with_value(:majorBidi) do
|
30
|
-
it_should_assign_successfully
|
31
|
-
it_should_output "<w:rFonts w:asciiTheme=\"majorBidi\"/>"
|
32
|
-
end
|
33
|
-
|
34
|
-
with_value(:majorEastAsia) do
|
35
|
-
it_should_assign_successfully
|
36
|
-
it_should_output "<w:rFonts w:asciiTheme=\"majorEastAsia\"/>"
|
37
|
-
end
|
38
|
-
|
39
|
-
with_value(:majorHAnsi) do
|
40
|
-
it_should_assign_successfully
|
41
|
-
it_should_output "<w:rFonts w:asciiTheme=\"majorHAnsi\"/>"
|
42
|
-
end
|
43
|
-
|
44
|
-
with_value(:minorAscii) do
|
45
|
-
it_should_assign_successfully
|
46
|
-
it_should_output "<w:rFonts w:asciiTheme=\"minorAscii\"/>"
|
47
|
-
end
|
48
|
-
|
49
|
-
with_value(:minorBidi) do
|
50
|
-
it_should_assign_successfully
|
51
|
-
it_should_output "<w:rFonts w:asciiTheme=\"minorBidi\"/>"
|
52
|
-
end
|
53
|
-
|
54
|
-
with_value(:minorEastAsia) do
|
55
|
-
it_should_assign_successfully
|
56
|
-
it_should_output "<w:rFonts w:asciiTheme=\"minorEastAsia\"/>"
|
57
|
-
end
|
58
|
-
|
59
|
-
with_value(:minorHAnsi) do
|
60
|
-
it_should_assign_successfully
|
61
|
-
it_should_output "<w:rFonts w:asciiTheme=\"minorHAnsi\"/>"
|
62
|
-
end
|
63
|
-
|
64
|
-
with_value(:latin) do
|
65
|
-
it_should_raise_an_exception
|
66
|
-
end
|
15
|
+
values = %i(majorAscii majorBidi majorEastAsia majorHAnsi
|
16
|
+
minorAscii minorBidi minorEastAsia minorHAnsi)
|
17
|
+
it_should_assign_and_output_xml values
|
18
|
+
it_should_not_allow_integers
|
19
|
+
it_should_not_allow_invalid_value
|
67
20
|
end
|
68
21
|
|
69
22
|
for_attribute(:complex) do
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
end
|
74
|
-
|
75
|
-
with_value(1) do
|
76
|
-
it_should_raise_an_exception
|
77
|
-
end
|
78
|
-
|
79
|
-
with_value(:monospace) do
|
80
|
-
it_should_raise_an_exception
|
81
|
-
end
|
23
|
+
it_should_assign_and_output_xml "Courier New"
|
24
|
+
it_should_not_allow_integers
|
25
|
+
it_should_not_allow_invalid_value
|
82
26
|
end
|
83
27
|
|
84
28
|
for_attribute(:complex_theme) do
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
with_value(:majorBidi) do
|
91
|
-
it_should_assign_successfully
|
92
|
-
it_should_output "<w:rFonts w:cstheme=\"majorBidi\"/>"
|
93
|
-
end
|
94
|
-
|
95
|
-
with_value(:majorEastAsia) do
|
96
|
-
it_should_assign_successfully
|
97
|
-
it_should_output "<w:rFonts w:cstheme=\"majorEastAsia\"/>"
|
98
|
-
end
|
99
|
-
|
100
|
-
with_value(:majorHAnsi) do
|
101
|
-
it_should_assign_successfully
|
102
|
-
it_should_output "<w:rFonts w:cstheme=\"majorHAnsi\"/>"
|
103
|
-
end
|
104
|
-
|
105
|
-
with_value(:minorAscii) do
|
106
|
-
it_should_assign_successfully
|
107
|
-
it_should_output "<w:rFonts w:cstheme=\"minorAscii\"/>"
|
108
|
-
end
|
109
|
-
|
110
|
-
with_value(:minorBidi) do
|
111
|
-
it_should_assign_successfully
|
112
|
-
it_should_output "<w:rFonts w:cstheme=\"minorBidi\"/>"
|
113
|
-
end
|
114
|
-
|
115
|
-
with_value(:minorEastAsia) do
|
116
|
-
it_should_assign_successfully
|
117
|
-
it_should_output "<w:rFonts w:cstheme=\"minorEastAsia\"/>"
|
118
|
-
end
|
119
|
-
|
120
|
-
with_value(:minorHAnsi) do
|
121
|
-
it_should_assign_successfully
|
122
|
-
it_should_output "<w:rFonts w:cstheme=\"minorHAnsi\"/>"
|
123
|
-
end
|
124
|
-
|
125
|
-
with_value(:latin) do
|
126
|
-
it_should_raise_an_exception
|
127
|
-
end
|
29
|
+
values = %i(majorAscii majorBidi majorEastAsia majorHAnsi
|
30
|
+
minorAscii minorBidi minorEastAsia minorHAnsi)
|
31
|
+
it_should_assign_and_output_xml values
|
32
|
+
it_should_not_allow_integers
|
33
|
+
it_should_not_allow_invalid_value
|
128
34
|
end
|
129
35
|
|
130
36
|
for_attribute(:east_asia) do
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
end
|
135
|
-
|
136
|
-
with_value(1) do
|
137
|
-
it_should_raise_an_exception
|
138
|
-
end
|
139
|
-
|
140
|
-
with_value(:monospace) do
|
141
|
-
it_should_raise_an_exception
|
142
|
-
end
|
37
|
+
it_should_assign_and_output_xml "Courier New"
|
38
|
+
it_should_not_allow_integers
|
39
|
+
it_should_not_allow_invalid_value
|
143
40
|
end
|
144
41
|
|
145
42
|
for_attribute(:east_asia_theme) do
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
with_value(:majorBidi) do
|
152
|
-
it_should_assign_successfully
|
153
|
-
it_should_output "<w:rFonts w:eastAsiaTheme=\"majorBidi\"/>"
|
154
|
-
end
|
155
|
-
|
156
|
-
with_value(:majorEastAsia) do
|
157
|
-
it_should_assign_successfully
|
158
|
-
it_should_output "<w:rFonts w:eastAsiaTheme=\"majorEastAsia\"/>"
|
159
|
-
end
|
160
|
-
|
161
|
-
with_value(:majorHAnsi) do
|
162
|
-
it_should_assign_successfully
|
163
|
-
it_should_output "<w:rFonts w:eastAsiaTheme=\"majorHAnsi\"/>"
|
164
|
-
end
|
165
|
-
|
166
|
-
with_value(:minorAscii) do
|
167
|
-
it_should_assign_successfully
|
168
|
-
it_should_output "<w:rFonts w:eastAsiaTheme=\"minorAscii\"/>"
|
169
|
-
end
|
170
|
-
|
171
|
-
with_value(:minorBidi) do
|
172
|
-
it_should_assign_successfully
|
173
|
-
it_should_output "<w:rFonts w:eastAsiaTheme=\"minorBidi\"/>"
|
174
|
-
end
|
175
|
-
|
176
|
-
with_value(:minorEastAsia) do
|
177
|
-
it_should_assign_successfully
|
178
|
-
it_should_output "<w:rFonts w:eastAsiaTheme=\"minorEastAsia\"/>"
|
179
|
-
end
|
180
|
-
|
181
|
-
with_value(:minorHAnsi) do
|
182
|
-
it_should_assign_successfully
|
183
|
-
it_should_output "<w:rFonts w:eastAsiaTheme=\"minorHAnsi\"/>"
|
184
|
-
end
|
185
|
-
|
186
|
-
with_value(:latin) do
|
187
|
-
it_should_raise_an_exception
|
188
|
-
end
|
43
|
+
values = %i(majorAscii majorBidi majorEastAsia majorHAnsi
|
44
|
+
minorAscii minorBidi minorEastAsia minorHAnsi)
|
45
|
+
it_should_assign_and_output_xml values
|
46
|
+
it_should_not_allow_invalid_value
|
189
47
|
end
|
190
48
|
|
191
49
|
for_attribute(:high_ansi) do
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
end
|
196
|
-
|
197
|
-
with_value(1) do
|
198
|
-
it_should_raise_an_exception
|
199
|
-
end
|
200
|
-
|
201
|
-
with_value(:monospace) do
|
202
|
-
it_should_raise_an_exception
|
203
|
-
end
|
50
|
+
it_should_assign_and_output_xml "Courier New"
|
51
|
+
it_should_not_allow_integers
|
52
|
+
it_should_not_allow_invalid_value
|
204
53
|
end
|
205
54
|
|
206
55
|
for_attribute(:high_ansi_theme) do
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
with_value(:majorBidi) do
|
213
|
-
it_should_assign_successfully
|
214
|
-
it_should_output "<w:rFonts w:hAnsiTheme=\"majorBidi\"/>"
|
215
|
-
end
|
216
|
-
|
217
|
-
with_value(:majorEastAsia) do
|
218
|
-
it_should_assign_successfully
|
219
|
-
it_should_output "<w:rFonts w:hAnsiTheme=\"majorEastAsia\"/>"
|
220
|
-
end
|
221
|
-
|
222
|
-
with_value(:majorHAnsi) do
|
223
|
-
it_should_assign_successfully
|
224
|
-
it_should_output "<w:rFonts w:hAnsiTheme=\"majorHAnsi\"/>"
|
225
|
-
end
|
226
|
-
|
227
|
-
with_value(:minorAscii) do
|
228
|
-
it_should_assign_successfully
|
229
|
-
it_should_output "<w:rFonts w:hAnsiTheme=\"minorAscii\"/>"
|
230
|
-
end
|
231
|
-
|
232
|
-
with_value(:minorBidi) do
|
233
|
-
it_should_assign_successfully
|
234
|
-
it_should_output "<w:rFonts w:hAnsiTheme=\"minorBidi\"/>"
|
235
|
-
end
|
236
|
-
|
237
|
-
with_value(:minorEastAsia) do
|
238
|
-
it_should_assign_successfully
|
239
|
-
it_should_output "<w:rFonts w:hAnsiTheme=\"minorEastAsia\"/>"
|
240
|
-
end
|
241
|
-
|
242
|
-
with_value(:minorHAnsi) do
|
243
|
-
it_should_assign_successfully
|
244
|
-
it_should_output "<w:rFonts w:hAnsiTheme=\"minorHAnsi\"/>"
|
245
|
-
end
|
246
|
-
|
247
|
-
with_value(:latin) do
|
248
|
-
it_should_raise_an_exception
|
249
|
-
end
|
56
|
+
values = %i(majorAscii majorBidi majorEastAsia majorHAnsi
|
57
|
+
minorAscii minorBidi minorEastAsia minorHAnsi)
|
58
|
+
it_should_assign_and_output_xml values
|
59
|
+
it_should_not_allow_integers
|
60
|
+
it_should_not_allow_invalid_value
|
250
61
|
end
|
251
62
|
|
252
63
|
for_attribute(:hint) do
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
with_value(:default) do
|
259
|
-
it_should_assign_successfully
|
260
|
-
it_should_output "<w:rFonts w:hint=\"default\"/>"
|
261
|
-
end
|
262
|
-
|
263
|
-
with_value(:eastAsia) do
|
264
|
-
it_should_assign_successfully
|
265
|
-
it_should_output "<w:rFonts w:hint=\"eastAsia\"/>"
|
266
|
-
end
|
267
|
-
|
268
|
-
with_value(:ascii) do
|
269
|
-
it_should_raise_an_exception
|
270
|
-
end
|
64
|
+
values = %i(cs default eastAsia)
|
65
|
+
it_should_assign_and_output_xml values
|
66
|
+
it_should_not_allow_integers
|
67
|
+
it_should_not_allow_invalid_value
|
271
68
|
end
|
272
69
|
|
273
70
|
end
|