openxml-docx 0.10.1 → 0.10.2
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile.lock +1 -1
- data/examples/booklet-printing +55 -0
- data/lib/openxml/docx/attribute_builder.rb +11 -5
- data/lib/openxml/docx/elements/absolute_position_tab.rb +1 -1
- data/lib/openxml/docx/elements/background.rb +16 -0
- data/lib/openxml/docx/elements/book_fold_printing.rb +1 -1
- data/lib/openxml/docx/elements/book_fold_reverse_printing.rb +1 -1
- data/lib/openxml/docx/elements/compatibility_setting.rb +10 -0
- data/lib/openxml/docx/elements/compatibility_settings.rb +15 -0
- data/lib/openxml/docx/elements/embed_bold.rb +2 -10
- data/lib/openxml/docx/elements/embed_bold_italic.rb +2 -10
- data/lib/openxml/docx/elements/embed_italic.rb +2 -10
- data/lib/openxml/docx/elements/embed_regular.rb +3 -3
- data/lib/openxml/docx/elements/embed_system_fonts.rb +1 -1
- data/lib/openxml/docx/elements/embed_true_type_fonts.rb +1 -1
- data/lib/openxml/docx/elements/even_and_odd_headers.rb +11 -0
- data/lib/openxml/docx/elements/family.rb +1 -1
- data/lib/openxml/docx/elements/markup_compatibility_choice.rb +1 -1
- data/lib/openxml/docx/elements/paragraph.rb +1 -0
- data/lib/openxml/docx/elements/save_subset_fonts.rb +1 -1
- data/lib/openxml/docx/elements/table_cell.rb +1 -0
- data/lib/openxml/docx/elements/textbox_content.rb +9 -0
- data/lib/openxml/docx/elements/word_processing_drawing_anchor.rb +6 -6
- data/lib/openxml/docx/elements/word_processing_drawing_inline.rb +16 -0
- data/lib/openxml/docx/elements/word_processing_drawing_object_nv_properties.rb +1 -1
- data/lib/openxml/docx/elements/word_processing_drawing_wrap_polygon.rb +1 -1
- data/lib/openxml/docx/elements/word_processing_shapes_body_properties.rb +12 -12
- data/lib/openxml/docx/elements/word_processing_shapes_nv_drawing_properties.rb +1 -1
- data/lib/openxml/docx/elements/word_processing_shapes_shape.rb +1 -2
- data/lib/openxml/docx/elements/word_processing_shapes_shape_properties.rb +1 -11
- data/lib/openxml/docx/elements/word_processing_shapes_textual_contents.rb +13 -0
- data/lib/openxml/{drawingml → docx}/elements/wordprocessing_shape_group.rb +1 -1
- data/lib/openxml/docx/package.rb +4 -3
- data/lib/openxml/docx/parts/document.rb +5 -0
- data/lib/openxml/docx/parts/header.rb +1 -1
- data/lib/openxml/docx/properties.rb +1 -0
- data/lib/openxml/docx/properties/border.rb +2 -2
- data/lib/openxml/docx/properties/columns.rb +8 -2
- data/lib/openxml/docx/properties/conditional_formatting.rb +12 -12
- data/lib/openxml/docx/properties/container_property.rb +10 -10
- data/lib/openxml/docx/properties/footer_references.rb +12 -0
- data/lib/openxml/docx/properties/frame.rb +1 -1
- data/lib/openxml/docx/properties/header_references.rb +12 -0
- data/lib/openxml/docx/properties/indentation.rb +5 -1
- data/lib/openxml/docx/properties/latent_styles.rb +4 -4
- data/lib/openxml/docx/properties/latent_styles_exception.rb +4 -4
- data/lib/openxml/docx/properties/section.rb +15 -0
- data/lib/openxml/docx/properties/table_border.rb +2 -2
- data/lib/openxml/docx/properties/table_cell_border.rb +2 -2
- data/lib/openxml/docx/properties/table_look.rb +7 -6
- data/lib/openxml/docx/properties/text_direction.rb +1 -1
- data/lib/openxml/docx/properties/transparent_container_property.rb +14 -0
- data/lib/openxml/docx/properties/vertical_merge.rb +14 -0
- data/lib/openxml/docx/section.rb +2 -0
- data/lib/openxml/docx/style.rb +18 -6
- data/lib/openxml/docx/version.rb +1 -1
- data/lib/openxml/drawingml/elements/blip_fill.rb +1 -1
- data/lib/openxml/drawingml/elements/children_extents.rb +14 -0
- data/lib/openxml/drawingml/elements/children_offset.rb +14 -0
- data/lib/openxml/drawingml/elements/graphic_frame_locks.rb +6 -6
- data/lib/openxml/drawingml/elements/no_autofit.rb +10 -0
- data/lib/openxml/drawingml/elements/no_fill.rb +1 -1
- data/lib/openxml/drawingml/elements/non_visual_drawing_properties.rb +1 -1
- data/lib/openxml/drawingml/elements/non_visual_picture_drawing_properties.rb +1 -1
- data/lib/openxml/drawingml/elements/non_visual_shape_drawing_properties.rb +12 -0
- data/lib/openxml/drawingml/elements/picture_locks.rb +11 -11
- data/lib/openxml/drawingml/elements/preset_text_warp.rb +25 -0
- data/lib/openxml/vml/elements/group.rb +17 -37
- data/lib/openxml/vml/elements/rectangle.rb +29 -62
- data/lib/openxml/vml/elements/rounded_rectangle.rb +29 -61
- data/spec/elements/absolute_position_tab_spec.rb +21 -15
- data/spec/elements/background_spec.rb +52 -0
- data/spec/elements/bidi_embed_spec.rb +12 -4
- data/spec/elements/bidi_override_spec.rb +12 -4
- data/spec/elements/break_spec.rb +12 -10
- data/spec/elements/compatibility_setting_spec.rb +41 -0
- data/spec/elements/compatibility_settings_spec.rb +8 -0
- data/spec/elements/content_part_spec.rb +2 -2
- data/spec/elements/control_spec.rb +5 -5
- data/spec/elements/deleted_text_spec.rb +2 -2
- data/spec/elements/drawingml/blip_fill_spec.rb +8 -3
- data/spec/elements/drawingml/extents_spec.rb +4 -4
- data/spec/elements/drawingml/head_end_spec.rb +16 -13
- data/spec/elements/drawingml/no_autofit_spec.rb +8 -0
- data/spec/elements/drawingml/non_visual_drawing_properties_spec.rb +6 -6
- data/spec/elements/drawingml/non_visual_shape_drawing_properties_spec.rb +24 -0
- data/spec/elements/drawingml/offset_spec.rb +14 -4
- data/spec/elements/drawingml/outline_spec.rb +20 -14
- data/spec/elements/drawingml/preset_geometry_spec.rb +1 -1
- data/spec/elements/drawingml/preset_text_warp_spec.rb +36 -0
- data/spec/elements/drawingml/shape_guide_spec.rb +7 -3
- data/spec/elements/drawingml/srgb_color_spec.rb +3 -4
- data/spec/elements/drawingml/tail_end_spec.rb +17 -14
- data/spec/elements/drawingml/transform_effect_spec.rb +48 -26
- data/spec/elements/markup_compatibility_choice_spec.rb +2 -2
- data/spec/elements/paragraph_spec.rb +25 -0
- data/spec/elements/symbol_spec.rb +4 -4
- data/spec/elements/text_spec.rb +1 -1
- data/spec/elements/textbox_content_spec.rb +8 -0
- data/spec/elements/vml/group_spec.rb +367 -375
- data/spec/elements/vml/rectangle_spec.rb +503 -513
- data/spec/elements/vml/rounded_rectangle_spec.rb +591 -463
- data/spec/elements/word_processing_drawing_effect_extent_spec.rb +32 -12
- data/spec/elements/word_processing_drawing_extent_spec.rb +4 -4
- data/spec/elements/word_processing_drawing_object_nv_properties_spec.rb +6 -6
- data/spec/elements/word_processing_drawing_simple_position_spec.rb +16 -6
- data/spec/elements/word_processing_shapes_body_properties_spec.rb +53 -44
- data/spec/elements/word_processing_shapes_shape_properties_spec.rb +6 -5
- data/spec/elements/word_processing_shapes_shape_spec.rb +2 -2
- data/spec/elements/word_processing_shapes_textual_content_spec.rb +23 -0
- data/spec/elements/{drawingml/wordprocessing_shape_group_spec.rb → wordprocessing_shape_group_spec.rb} +1 -1
- data/spec/properties/indentation_spec.rb +28 -0
- data/spec/properties/table_look_spec.rb +5 -0
- data/spec/properties/text_direction_spec.rb +5 -0
- data/spec/properties/vertical_merge_spec.rb +22 -0
- data/spec/support/data/elements/paragraph_with_section_properties_element.xml +12 -0
- data/spec/support/data/parts/empty_header_part.xml +1 -1
- data/spec/support/data/parts/header_with_children_part.xml +1 -1
- metadata +76 -27
- checksums.yaml +0 -7
@@ -6,734 +6,724 @@ describe OpenXml::Vml::Elements::Rectangle do
|
|
6
6
|
it_should_use tag: :rect, name: "rectangle"
|
7
7
|
|
8
8
|
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
9
|
+
describe "Connector Type Attribute" do
|
10
|
+
for_attribute(:connector_type, displays_as: :connectortype, with_namespace: :o) do
|
11
|
+
%i(curved elbow none straight).each do |value|
|
12
|
+
with_value(value) do
|
13
|
+
it_should_assign_successfully
|
14
|
+
it_should_output "<v:rect o:connectortype=\"#{value}\"/>"
|
15
|
+
end
|
16
16
|
end
|
17
|
-
end
|
18
17
|
|
19
|
-
|
20
|
-
|
18
|
+
with_values([:funky, 5, "auto"]) do
|
19
|
+
it_should_raise_an_exception
|
20
|
+
end
|
21
21
|
end
|
22
22
|
end
|
23
23
|
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
it_should_output "<v:rect o:hralign=\"#{value}\"/>"
|
24
|
+
describe "HR Align Attribute" do
|
25
|
+
for_attribute(:hr_align, displays_as: :hralign, with_namespace: :o) do
|
26
|
+
%i(center left right).each do |value|
|
27
|
+
with_value(value) do
|
28
|
+
it_should_assign_successfully
|
29
|
+
it_should_output "<v:rect o:hralign=\"#{value}\"/>"
|
30
|
+
end
|
32
31
|
end
|
33
|
-
end
|
34
32
|
|
35
|
-
|
36
|
-
|
33
|
+
with_values([:justified, 4, "overThere"]) do
|
34
|
+
it_should_raise_an_exception
|
35
|
+
end
|
37
36
|
end
|
38
37
|
end
|
39
38
|
|
39
|
+
describe "Inset Mode Attribute" do
|
40
|
+
for_attribute(:inset_mode, displays_as: :insetmode, with_namespace: :o) do
|
41
|
+
with_value(:auto) do
|
42
|
+
it_should_assign_successfully
|
43
|
+
it_should_output "<v:rect o:insetmode=\"auto\"/>"
|
44
|
+
end
|
40
45
|
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
it_should_assign_successfully
|
46
|
-
it_should_output "<v:rect o:insetmode=\"auto\"/>"
|
47
|
-
end
|
48
|
-
|
49
|
-
with_value(:custom) do
|
50
|
-
it_should_assign_successfully
|
51
|
-
it_should_output "<v:rect o:insetmode=\"custom\"/>"
|
52
|
-
end
|
46
|
+
with_value(:custom) do
|
47
|
+
it_should_assign_successfully
|
48
|
+
it_should_output "<v:rect o:insetmode=\"custom\"/>"
|
49
|
+
end
|
53
50
|
|
54
|
-
|
55
|
-
|
51
|
+
with_values([:left, "right", 0]) do
|
52
|
+
it_should_raise_an_exception
|
53
|
+
end
|
56
54
|
end
|
57
55
|
end
|
58
56
|
|
57
|
+
describe "Coordinate-based Attributes" do
|
58
|
+
good_coord_values = [ "100,100", "-100,-100", "100,-100", "100, 100", "-100, -100", "100, -100" ]
|
59
|
+
bad_coord_values = [ "100 100", "x:10,y:10", :over_there ]
|
59
60
|
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
good_coord_values.each do |good_value|
|
67
|
-
with_value(good_value) do
|
68
|
-
it_should_assign_successfully
|
69
|
-
it_should_output "<v:rect coordorigin=\"#{good_value}\"/>"
|
61
|
+
for_attribute(:coordinate_origin, displays_as: :coordorigin) do
|
62
|
+
good_coord_values.each do |good_value|
|
63
|
+
with_value(good_value) do
|
64
|
+
it_should_assign_successfully
|
65
|
+
it_should_output "<v:rect coordorigin=\"#{good_value}\"/>"
|
66
|
+
end
|
70
67
|
end
|
71
|
-
end
|
72
68
|
|
73
|
-
|
74
|
-
|
69
|
+
with_values(bad_coord_values) do
|
70
|
+
it_should_raise_an_exception
|
71
|
+
end
|
75
72
|
end
|
76
|
-
end
|
77
73
|
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
74
|
+
for_attribute(:coordinate_size, displays_as: :coordsize) do
|
75
|
+
good_coord_values.each do |good_value|
|
76
|
+
with_value(good_value) do
|
77
|
+
it_should_assign_successfully
|
78
|
+
it_should_output "<v:rect coordsize=\"#{good_value}\"/>"
|
79
|
+
end
|
83
80
|
end
|
84
|
-
end
|
85
81
|
|
86
|
-
|
87
|
-
|
82
|
+
with_values(bad_coord_values) do
|
83
|
+
it_should_raise_an_exception
|
84
|
+
end
|
88
85
|
end
|
89
86
|
end
|
90
87
|
|
88
|
+
describe "Color-based Attributes" do
|
89
|
+
good_color_values = [ "#FFFFFF", :red, "palateEntry [0]", "palateEntry" ]
|
90
|
+
bad_color_values = [ 54, 0 ]
|
91
91
|
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
good_color_values.each do |good_value|
|
99
|
-
with_value(good_value) do
|
100
|
-
it_should_assign_successfully
|
101
|
-
it_should_output "<v:rect chromakey=\"#{good_value}\"/>"
|
92
|
+
for_attribute(:chroma_key, displays_as: :chromakey) do
|
93
|
+
good_color_values.each do |good_value|
|
94
|
+
with_value(good_value) do
|
95
|
+
it_should_assign_successfully
|
96
|
+
it_should_output "<v:rect chromakey=\"#{good_value}\"/>"
|
97
|
+
end
|
102
98
|
end
|
103
|
-
end
|
104
99
|
|
105
|
-
|
106
|
-
|
100
|
+
with_values(bad_color_values) do
|
101
|
+
it_should_raise_an_exception
|
102
|
+
end
|
107
103
|
end
|
108
|
-
end
|
109
104
|
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
105
|
+
for_attribute(:fill_color, displays_as: :fillcolor) do
|
106
|
+
good_color_values.each do |good_value|
|
107
|
+
with_value(good_value) do
|
108
|
+
it_should_assign_successfully
|
109
|
+
it_should_output "<v:rect fillcolor=\"#{good_value}\"/>"
|
110
|
+
end
|
115
111
|
end
|
116
|
-
end
|
117
112
|
|
118
|
-
|
119
|
-
|
113
|
+
with_values(bad_color_values) do
|
114
|
+
it_should_raise_an_exception
|
115
|
+
end
|
120
116
|
end
|
121
|
-
end
|
122
117
|
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
118
|
+
for_attribute(:stroke_color, displays_as: :strokecolor) do
|
119
|
+
good_color_values.each do |good_value|
|
120
|
+
with_value(good_value) do
|
121
|
+
it_should_assign_successfully
|
122
|
+
it_should_output "<v:rect strokecolor=\"#{good_value}\"/>"
|
123
|
+
end
|
128
124
|
end
|
129
|
-
end
|
130
125
|
|
131
|
-
|
132
|
-
|
126
|
+
with_values(bad_color_values) do
|
127
|
+
it_should_raise_an_exception
|
128
|
+
end
|
133
129
|
end
|
134
130
|
end
|
135
131
|
|
132
|
+
describe "Diagram Layout-based Attributes" do
|
133
|
+
good_diagram_layout_values = (0..3)
|
134
|
+
bad_diagram_layout_values = [ -1, 4, "Five is Right Out" ]
|
136
135
|
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
good_diagram_layout_values.each do |good_value|
|
144
|
-
with_value(good_value) do
|
145
|
-
it_should_assign_successfully
|
146
|
-
it_should_output "<v:rect o:dgmlayout=\"#{good_value}\"/>"
|
136
|
+
for_attribute(:diagram_node_layout, displays_as: :dgmlayout, with_namespace: :o) do
|
137
|
+
good_diagram_layout_values.each do |good_value|
|
138
|
+
with_value(good_value) do
|
139
|
+
it_should_assign_successfully
|
140
|
+
it_should_output "<v:rect o:dgmlayout=\"#{good_value}\"/>"
|
141
|
+
end
|
147
142
|
end
|
148
|
-
end
|
149
143
|
|
150
|
-
|
151
|
-
|
144
|
+
with_values(bad_diagram_layout_values) do
|
145
|
+
it_should_raise_an_exception
|
146
|
+
end
|
152
147
|
end
|
153
|
-
end
|
154
148
|
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
149
|
+
for_attribute(:diagram_node_recent_layout, displays_as: :dgmlayoutmru, with_namespace: :o) do
|
150
|
+
good_diagram_layout_values.each do |good_value|
|
151
|
+
with_value(good_value) do
|
152
|
+
it_should_assign_successfully
|
153
|
+
it_should_output "<v:rect o:dgmlayoutmru=\"#{good_value}\"/>"
|
154
|
+
end
|
160
155
|
end
|
161
|
-
end
|
162
156
|
|
163
|
-
|
164
|
-
|
157
|
+
with_values(bad_diagram_layout_values) do
|
158
|
+
it_should_raise_an_exception
|
159
|
+
end
|
165
160
|
end
|
166
161
|
end
|
167
162
|
|
163
|
+
describe "Integer-based Attributes" do
|
164
|
+
good_integer_values = [1, -1, 0]
|
165
|
+
bad_integer_values = [2.5, :five, "five"]
|
168
166
|
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
good_integer_values.each do |good_value|
|
176
|
-
with_value(good_value) do
|
177
|
-
it_should_assign_successfully
|
178
|
-
it_should_output "<v:rect o:dgmnodekind=\"#{good_value}\"/>"
|
167
|
+
for_attribute(:diagram_node_kind, displays_as: :dgmnodekind, with_namespace: :o) do
|
168
|
+
good_integer_values.each do |good_value|
|
169
|
+
with_value(good_value) do
|
170
|
+
it_should_assign_successfully
|
171
|
+
it_should_output "<v:rect o:dgmnodekind=\"#{good_value}\"/>"
|
172
|
+
end
|
179
173
|
end
|
180
|
-
end
|
181
174
|
|
182
|
-
|
183
|
-
|
175
|
+
with_values(bad_integer_values) do
|
176
|
+
it_should_raise_an_exception
|
177
|
+
end
|
184
178
|
end
|
185
|
-
end
|
186
179
|
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
180
|
+
for_attribute(:hr_percent, displays_as: :hrpct, with_namespace: :o) do
|
181
|
+
good_integer_values.each do |good_value|
|
182
|
+
with_value(good_value) do
|
183
|
+
it_should_assign_successfully
|
184
|
+
it_should_output "<v:rect o:hrpct=\"#{good_value}\"/>"
|
185
|
+
end
|
192
186
|
end
|
193
|
-
end
|
194
187
|
|
195
|
-
|
196
|
-
|
188
|
+
with_values(bad_integer_values) do
|
189
|
+
it_should_raise_an_exception
|
190
|
+
end
|
197
191
|
end
|
198
|
-
end
|
199
192
|
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
193
|
+
for_attribute(:regroup_id, displays_as: :regroupid, with_namespace: :o) do
|
194
|
+
good_integer_values.each do |good_value|
|
195
|
+
with_value(good_value) do
|
196
|
+
it_should_assign_successfully
|
197
|
+
it_should_output "<v:rect o:regroupid=\"#{good_value}\"/>"
|
198
|
+
end
|
205
199
|
end
|
206
|
-
end
|
207
200
|
|
208
|
-
|
209
|
-
|
201
|
+
with_values(bad_integer_values) do
|
202
|
+
it_should_raise_an_exception
|
203
|
+
end
|
210
204
|
end
|
211
205
|
end
|
212
206
|
|
207
|
+
describe "Black and White Mode-based Attributes" do
|
208
|
+
good_bw_mode_values = %i(auto black blackTextAndLines color grayOutline grayScale hide highContrast inverseGray lightGrayscale undrawn white)
|
209
|
+
bad_bw_mode_values = [:paintItBlack, 0, "rainbows"]
|
213
210
|
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
good_bw_mode_values.each do |good_value|
|
221
|
-
with_value(good_value) do
|
222
|
-
it_should_assign_successfully
|
223
|
-
it_should_output "<v:rect o:bwmode=\"#{good_value}\"/>"
|
211
|
+
for_attribute(:bw_mode, displays_as: :bwmode, with_namespace: :o) do
|
212
|
+
good_bw_mode_values.each do |good_value|
|
213
|
+
with_value(good_value) do
|
214
|
+
it_should_assign_successfully
|
215
|
+
it_should_output "<v:rect o:bwmode=\"#{good_value}\"/>"
|
216
|
+
end
|
224
217
|
end
|
225
|
-
end
|
226
218
|
|
227
|
-
|
228
|
-
|
219
|
+
with_values(bad_bw_mode_values) do
|
220
|
+
it_should_raise_an_exception
|
221
|
+
end
|
229
222
|
end
|
230
|
-
end
|
231
223
|
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
224
|
+
for_attribute(:bw_normal, displays_as: :bwnormal, with_namespace: :o) do
|
225
|
+
good_bw_mode_values.each do |good_value|
|
226
|
+
with_value(good_value) do
|
227
|
+
it_should_assign_successfully
|
228
|
+
it_should_output "<v:rect o:bwnormal=\"#{good_value}\"/>"
|
229
|
+
end
|
237
230
|
end
|
238
|
-
end
|
239
231
|
|
240
|
-
|
241
|
-
|
232
|
+
with_values(bad_bw_mode_values) do
|
233
|
+
it_should_raise_an_exception
|
234
|
+
end
|
242
235
|
end
|
243
|
-
end
|
244
236
|
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
|
237
|
+
for_attribute(:bw_pure, displays_as: :bwpure, with_namespace: :o) do
|
238
|
+
good_bw_mode_values.each do |good_value|
|
239
|
+
with_value(good_value) do
|
240
|
+
it_should_assign_successfully
|
241
|
+
it_should_output "<v:rect o:bwpure=\"#{good_value}\"/>"
|
242
|
+
end
|
250
243
|
end
|
251
|
-
end
|
252
244
|
|
253
|
-
|
254
|
-
|
245
|
+
with_values(bad_bw_mode_values) do
|
246
|
+
it_should_raise_an_exception
|
247
|
+
end
|
255
248
|
end
|
256
249
|
end
|
257
250
|
|
251
|
+
describe "String-based Attributes" do
|
252
|
+
bad_string_values = [0, :nope, false]
|
258
253
|
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
|
264
|
-
with_value("String") do
|
265
|
-
it_should_assign_successfully
|
266
|
-
it_should_output "<v:rect alt=\"String\"/>"
|
267
|
-
end
|
254
|
+
for_attribute(:alt) do
|
255
|
+
with_value("String") do
|
256
|
+
it_should_assign_successfully
|
257
|
+
it_should_output "<v:rect alt=\"String\"/>"
|
258
|
+
end
|
268
259
|
|
269
|
-
|
270
|
-
|
271
|
-
|
272
|
-
|
260
|
+
with_value("000001f") do
|
261
|
+
it_should_assign_successfully
|
262
|
+
it_should_output "<v:rect alt=\"000001f\"/>"
|
263
|
+
end
|
273
264
|
|
274
265
|
|
275
|
-
|
276
|
-
|
266
|
+
with_values(bad_string_values) do
|
267
|
+
it_should_raise_an_exception
|
268
|
+
end
|
277
269
|
end
|
278
|
-
end
|
279
270
|
|
280
|
-
|
281
|
-
|
282
|
-
|
283
|
-
|
284
|
-
|
271
|
+
for_attribute(:css_class, displays_as: :class) do
|
272
|
+
with_value("String") do
|
273
|
+
it_should_assign_successfully
|
274
|
+
it_should_output "<v:rect class=\"String\"/>"
|
275
|
+
end
|
285
276
|
|
286
|
-
|
287
|
-
|
277
|
+
with_values(bad_string_values) do
|
278
|
+
it_should_raise_an_exception
|
279
|
+
end
|
288
280
|
end
|
289
|
-
end
|
290
281
|
|
291
|
-
|
292
|
-
|
293
|
-
|
294
|
-
|
295
|
-
|
282
|
+
for_attribute(:href) do
|
283
|
+
with_value("http://something.com") do
|
284
|
+
it_should_assign_successfully
|
285
|
+
it_should_output "<v:rect href=\"http://something.com\"/>"
|
286
|
+
end
|
296
287
|
|
297
|
-
|
298
|
-
|
288
|
+
with_values(bad_string_values) do
|
289
|
+
it_should_raise_an_exception
|
290
|
+
end
|
299
291
|
end
|
300
|
-
end
|
301
292
|
|
302
|
-
|
303
|
-
|
304
|
-
|
305
|
-
|
306
|
-
|
293
|
+
for_attribute(:id) do
|
294
|
+
with_value("String") do
|
295
|
+
it_should_assign_successfully
|
296
|
+
it_should_output "<v:rect id=\"String\"/>"
|
297
|
+
end
|
307
298
|
|
308
|
-
|
309
|
-
|
299
|
+
with_values(bad_string_values) do
|
300
|
+
it_should_raise_an_exception
|
301
|
+
end
|
310
302
|
end
|
311
|
-
end
|
312
303
|
|
313
|
-
|
314
|
-
|
315
|
-
|
316
|
-
|
317
|
-
|
304
|
+
for_attribute(:opacity) do
|
305
|
+
with_value("String") do
|
306
|
+
it_should_assign_successfully
|
307
|
+
it_should_output "<v:rect opacity=\"String\"/>"
|
308
|
+
end
|
318
309
|
|
319
|
-
|
320
|
-
|
321
|
-
|
322
|
-
|
310
|
+
with_value("0.5") do
|
311
|
+
it_should_assign_successfully
|
312
|
+
it_should_output "<v:rect opacity=\"0.5\"/>"
|
313
|
+
end
|
323
314
|
|
324
|
-
|
325
|
-
|
315
|
+
with_values(bad_string_values) do
|
316
|
+
it_should_raise_an_exception
|
317
|
+
end
|
326
318
|
end
|
327
|
-
end
|
328
319
|
|
329
|
-
|
330
|
-
|
331
|
-
|
332
|
-
|
333
|
-
|
320
|
+
for_attribute(:stroke_weight, displays_as: :strokeweight) do
|
321
|
+
with_value("String") do
|
322
|
+
it_should_assign_successfully
|
323
|
+
it_should_output "<v:rect strokeweight=\"String\"/>"
|
324
|
+
end
|
334
325
|
|
335
|
-
|
336
|
-
|
337
|
-
|
338
|
-
|
326
|
+
with_value("000001f") do
|
327
|
+
it_should_assign_successfully
|
328
|
+
it_should_output "<v:rect strokeweight=\"000001f\"/>"
|
329
|
+
end
|
339
330
|
|
340
|
-
|
341
|
-
|
331
|
+
with_values(bad_string_values) do
|
332
|
+
it_should_raise_an_exception
|
333
|
+
end
|
342
334
|
end
|
343
|
-
end
|
344
335
|
|
345
|
-
|
346
|
-
|
347
|
-
|
348
|
-
|
349
|
-
|
336
|
+
for_attribute(:style) do
|
337
|
+
with_value("String") do
|
338
|
+
it_should_assign_successfully
|
339
|
+
it_should_output "<v:rect style=\"String\"/>"
|
340
|
+
end
|
350
341
|
|
351
|
-
|
352
|
-
|
342
|
+
with_values(bad_string_values) do
|
343
|
+
it_should_raise_an_exception
|
344
|
+
end
|
353
345
|
end
|
354
|
-
end
|
355
346
|
|
356
|
-
|
357
|
-
|
358
|
-
|
359
|
-
|
360
|
-
|
347
|
+
for_attribute(:target) do
|
348
|
+
with_value("String") do
|
349
|
+
it_should_assign_successfully
|
350
|
+
it_should_output "<v:rect target=\"String\"/>"
|
351
|
+
end
|
361
352
|
|
362
|
-
|
363
|
-
|
353
|
+
with_values(bad_string_values) do
|
354
|
+
it_should_raise_an_exception
|
355
|
+
end
|
364
356
|
end
|
365
|
-
end
|
366
357
|
|
367
|
-
|
368
|
-
|
369
|
-
|
370
|
-
|
371
|
-
|
358
|
+
for_attribute(:title) do
|
359
|
+
with_value("String") do
|
360
|
+
it_should_assign_successfully
|
361
|
+
it_should_output "<v:rect title=\"String\"/>"
|
362
|
+
end
|
372
363
|
|
373
|
-
|
374
|
-
|
364
|
+
with_values(bad_string_values) do
|
365
|
+
it_should_raise_an_exception
|
366
|
+
end
|
375
367
|
end
|
376
|
-
end
|
377
368
|
|
378
|
-
|
379
|
-
|
380
|
-
|
381
|
-
|
382
|
-
|
369
|
+
for_attribute(:wrap_coordinates, displays_as: :wrapcoords) do
|
370
|
+
with_value("String") do
|
371
|
+
it_should_assign_successfully
|
372
|
+
it_should_output "<v:rect wrapcoords=\"String\"/>"
|
373
|
+
end
|
383
374
|
|
384
|
-
|
385
|
-
|
386
|
-
|
387
|
-
|
375
|
+
with_value("0,0,100,100") do
|
376
|
+
it_should_assign_successfully
|
377
|
+
it_should_output "<v:rect wrapcoords=\"0,0,100,100\"/>"
|
378
|
+
end
|
388
379
|
|
389
|
-
|
390
|
-
|
380
|
+
with_values(bad_string_values) do
|
381
|
+
it_should_raise_an_exception
|
382
|
+
end
|
391
383
|
end
|
392
|
-
end
|
393
384
|
|
394
|
-
|
395
|
-
|
396
|
-
|
397
|
-
|
398
|
-
|
385
|
+
for_attribute(:border_bottom_color, displays_as: :borderbottomcolor, with_namespace: :o) do
|
386
|
+
with_value("String") do
|
387
|
+
it_should_assign_successfully
|
388
|
+
it_should_output "<v:rect o:borderbottomcolor=\"String\"/>"
|
389
|
+
end
|
399
390
|
|
400
|
-
|
401
|
-
|
391
|
+
with_values(bad_string_values) do
|
392
|
+
it_should_raise_an_exception
|
393
|
+
end
|
402
394
|
end
|
403
|
-
end
|
404
395
|
|
405
|
-
|
406
|
-
|
407
|
-
|
408
|
-
|
409
|
-
|
396
|
+
for_attribute(:border_left_color, displays_as: :borderleftcolor, with_namespace: :o) do
|
397
|
+
with_value("String") do
|
398
|
+
it_should_assign_successfully
|
399
|
+
it_should_output "<v:rect o:borderleftcolor=\"String\"/>"
|
400
|
+
end
|
410
401
|
|
411
|
-
|
412
|
-
|
402
|
+
with_values(bad_string_values) do
|
403
|
+
it_should_raise_an_exception
|
404
|
+
end
|
413
405
|
end
|
414
|
-
end
|
415
406
|
|
416
|
-
|
417
|
-
|
418
|
-
|
419
|
-
|
420
|
-
|
407
|
+
for_attribute(:border_right_color, displays_as: :borderrightcolor, with_namespace: :o) do
|
408
|
+
with_value("String") do
|
409
|
+
it_should_assign_successfully
|
410
|
+
it_should_output "<v:rect o:borderrightcolor=\"String\"/>"
|
411
|
+
end
|
421
412
|
|
422
|
-
|
423
|
-
|
413
|
+
with_values(bad_string_values) do
|
414
|
+
it_should_raise_an_exception
|
415
|
+
end
|
424
416
|
end
|
425
|
-
end
|
426
417
|
|
427
|
-
|
428
|
-
|
429
|
-
|
430
|
-
|
431
|
-
|
418
|
+
for_attribute(:border_top_color, displays_as: :bordertopcolor, with_namespace: :o) do
|
419
|
+
with_value("String") do
|
420
|
+
it_should_assign_successfully
|
421
|
+
it_should_output "<v:rect o:bordertopcolor=\"String\"/>"
|
422
|
+
end
|
432
423
|
|
433
|
-
|
434
|
-
|
424
|
+
with_values(bad_string_values) do
|
425
|
+
it_should_raise_an_exception
|
426
|
+
end
|
435
427
|
end
|
436
|
-
end
|
437
428
|
|
438
|
-
|
439
|
-
|
440
|
-
|
441
|
-
|
442
|
-
|
429
|
+
for_attribute(:optional_string, displays_as: :spid, with_namespace: :o) do
|
430
|
+
with_value("String") do
|
431
|
+
it_should_assign_successfully
|
432
|
+
it_should_output "<v:rect o:spid=\"String\"/>"
|
433
|
+
end
|
443
434
|
|
444
|
-
|
445
|
-
|
435
|
+
with_values(bad_string_values) do
|
436
|
+
it_should_raise_an_exception
|
437
|
+
end
|
446
438
|
end
|
447
|
-
end
|
448
439
|
|
449
|
-
|
450
|
-
|
451
|
-
|
452
|
-
|
453
|
-
|
440
|
+
for_attribute(:optional_number, displays_as: :spt, with_namespace: :o) do
|
441
|
+
with_value("NumberAsString") do
|
442
|
+
it_should_assign_successfully
|
443
|
+
it_should_output "<v:rect o:spt=\"NumberAsString\"/>"
|
444
|
+
end
|
454
445
|
|
455
|
-
|
456
|
-
|
446
|
+
with_values(bad_string_values) do
|
447
|
+
it_should_raise_an_exception
|
448
|
+
end
|
457
449
|
end
|
458
450
|
end
|
459
451
|
|
452
|
+
describe "(Explicitly) True/False-based Attributes" do
|
453
|
+
good_tf_values = [true, false]
|
454
|
+
bad_tf_values = ["yes", "no", "on", "off", 5]
|
460
455
|
|
461
|
-
|
462
|
-
|
463
|
-
|
464
|
-
|
465
|
-
|
466
|
-
|
467
|
-
good_tf_values.each do |good_value|
|
468
|
-
with_value(good_value) do
|
469
|
-
it_should_assign_successfully
|
470
|
-
it_should_output "<v:rect filled=\"#{good_value}\"/>"
|
456
|
+
for_attribute(:filled) do
|
457
|
+
good_tf_values.each do |good_value|
|
458
|
+
with_value(good_value) do
|
459
|
+
it_should_assign_successfully
|
460
|
+
it_should_output "<v:rect filled=\"#{good_value}\"/>"
|
461
|
+
end
|
471
462
|
end
|
472
|
-
end
|
473
463
|
|
474
|
-
|
475
|
-
|
464
|
+
with_values(bad_tf_values) do
|
465
|
+
it_should_raise_an_exception
|
466
|
+
end
|
476
467
|
end
|
477
|
-
end
|
478
468
|
|
479
|
-
|
480
|
-
|
481
|
-
|
482
|
-
|
483
|
-
|
469
|
+
for_attribute(:inset_pen, displays_as: :insetpen) do
|
470
|
+
good_tf_values.each do |good_value|
|
471
|
+
with_value(good_value) do
|
472
|
+
it_should_assign_successfully
|
473
|
+
it_should_output "<v:rect insetpen=\"#{good_value}\"/>"
|
474
|
+
end
|
484
475
|
end
|
485
|
-
end
|
486
476
|
|
487
|
-
|
488
|
-
|
477
|
+
with_values(bad_tf_values) do
|
478
|
+
it_should_raise_an_exception
|
479
|
+
end
|
489
480
|
end
|
490
|
-
end
|
491
481
|
|
492
|
-
|
493
|
-
|
494
|
-
|
495
|
-
|
496
|
-
|
482
|
+
for_attribute(:print) do
|
483
|
+
good_tf_values.each do |good_value|
|
484
|
+
with_value(good_value) do
|
485
|
+
it_should_assign_successfully
|
486
|
+
it_should_output "<v:rect print=\"#{good_value}\"/>"
|
487
|
+
end
|
497
488
|
end
|
498
|
-
end
|
499
489
|
|
500
|
-
|
501
|
-
|
490
|
+
with_values(bad_tf_values) do
|
491
|
+
it_should_raise_an_exception
|
492
|
+
end
|
502
493
|
end
|
503
|
-
end
|
504
494
|
|
505
|
-
|
506
|
-
|
507
|
-
|
508
|
-
|
509
|
-
|
495
|
+
for_attribute(:stroked) do
|
496
|
+
good_tf_values.each do |good_value|
|
497
|
+
with_value(good_value) do
|
498
|
+
it_should_assign_successfully
|
499
|
+
it_should_output "<v:rect stroked=\"#{good_value}\"/>"
|
500
|
+
end
|
510
501
|
end
|
511
|
-
end
|
512
502
|
|
513
|
-
|
514
|
-
|
503
|
+
with_values(bad_tf_values) do
|
504
|
+
it_should_raise_an_exception
|
505
|
+
end
|
515
506
|
end
|
516
|
-
end
|
517
507
|
|
518
|
-
|
519
|
-
|
520
|
-
|
521
|
-
|
522
|
-
|
508
|
+
for_attribute(:allow_in_cell, displays_as: :allowincell, with_namespace: :o) do
|
509
|
+
good_tf_values.each do |good_value|
|
510
|
+
with_value(good_value) do
|
511
|
+
it_should_assign_successfully
|
512
|
+
it_should_output "<v:rect o:allowincell=\"#{good_value}\"/>"
|
513
|
+
end
|
514
|
+
end
|
515
|
+
with_values(bad_tf_values) do
|
516
|
+
it_should_raise_an_exception
|
523
517
|
end
|
524
518
|
end
|
525
|
-
with_values(bad_tf_values) do
|
526
|
-
it_should_raise_an_exception
|
527
|
-
end
|
528
|
-
end
|
529
519
|
|
530
|
-
|
531
|
-
|
532
|
-
|
533
|
-
|
534
|
-
|
520
|
+
for_attribute(:allow_overlap, displays_as: :allowoverlap, with_namespace: :o) do
|
521
|
+
good_tf_values.each do |good_value|
|
522
|
+
with_value(good_value) do
|
523
|
+
it_should_assign_successfully
|
524
|
+
it_should_output "<v:rect o:allowoverlap=\"#{good_value}\"/>"
|
525
|
+
end
|
535
526
|
end
|
536
|
-
end
|
537
527
|
|
538
|
-
|
539
|
-
|
528
|
+
with_values(bad_tf_values) do
|
529
|
+
it_should_raise_an_exception
|
530
|
+
end
|
540
531
|
end
|
541
|
-
end
|
542
532
|
|
543
|
-
|
544
|
-
|
545
|
-
|
546
|
-
|
547
|
-
|
533
|
+
for_attribute(:bullet, with_namespace: :o) do
|
534
|
+
good_tf_values.each do |good_value|
|
535
|
+
with_value(good_value) do
|
536
|
+
it_should_assign_successfully
|
537
|
+
it_should_output "<v:rect o:bullet=\"#{good_value}\"/>"
|
538
|
+
end
|
548
539
|
end
|
549
|
-
end
|
550
540
|
|
551
|
-
|
552
|
-
|
541
|
+
with_values(bad_tf_values) do
|
542
|
+
it_should_raise_an_exception
|
543
|
+
end
|
553
544
|
end
|
554
|
-
end
|
555
545
|
|
556
|
-
|
557
|
-
|
558
|
-
|
559
|
-
|
560
|
-
|
546
|
+
for_attribute(:button, with_namespace: :o) do
|
547
|
+
good_tf_values.each do |good_value|
|
548
|
+
with_value(good_value) do
|
549
|
+
it_should_assign_successfully
|
550
|
+
it_should_output "<v:rect o:button=\"#{good_value}\"/>"
|
551
|
+
end
|
561
552
|
end
|
562
|
-
end
|
563
553
|
|
564
|
-
|
565
|
-
|
554
|
+
with_values(bad_tf_values) do
|
555
|
+
it_should_raise_an_exception
|
556
|
+
end
|
566
557
|
end
|
567
|
-
end
|
568
558
|
|
569
|
-
|
570
|
-
|
571
|
-
|
572
|
-
|
573
|
-
|
559
|
+
for_attribute(:clip, with_namespace: :o) do
|
560
|
+
good_tf_values.each do |good_value|
|
561
|
+
with_value(good_value) do
|
562
|
+
it_should_assign_successfully
|
563
|
+
it_should_output "<v:rect o:clip=\"#{good_value}\"/>"
|
564
|
+
end
|
574
565
|
end
|
575
|
-
end
|
576
566
|
|
577
|
-
|
578
|
-
|
567
|
+
with_values(bad_tf_values) do
|
568
|
+
it_should_raise_an_exception
|
569
|
+
end
|
579
570
|
end
|
580
|
-
end
|
581
571
|
|
582
|
-
|
583
|
-
|
584
|
-
|
585
|
-
|
586
|
-
|
572
|
+
for_attribute(:clip_to_wrap, displays_as: :cliptowrap, with_namespace: :o) do
|
573
|
+
good_tf_values.each do |good_value|
|
574
|
+
with_value(good_value) do
|
575
|
+
it_should_assign_successfully
|
576
|
+
it_should_output "<v:rect o:cliptowrap=\"#{good_value}\"/>"
|
577
|
+
end
|
587
578
|
end
|
588
|
-
end
|
589
579
|
|
590
|
-
|
591
|
-
|
580
|
+
with_values(bad_tf_values) do
|
581
|
+
it_should_raise_an_exception
|
582
|
+
end
|
592
583
|
end
|
593
|
-
end
|
594
584
|
|
595
|
-
|
596
|
-
|
597
|
-
|
598
|
-
|
599
|
-
|
585
|
+
for_attribute(:double_click_notify, displays_as: :doubleclicknotify, with_namespace: :o) do
|
586
|
+
good_tf_values.each do |good_value|
|
587
|
+
with_value(good_value) do
|
588
|
+
it_should_assign_successfully
|
589
|
+
it_should_output "<v:rect o:doubleclicknotify=\"#{good_value}\"/>"
|
590
|
+
end
|
600
591
|
end
|
601
|
-
end
|
602
592
|
|
603
|
-
|
604
|
-
|
593
|
+
with_values(bad_tf_values) do
|
594
|
+
it_should_raise_an_exception
|
595
|
+
end
|
605
596
|
end
|
606
|
-
end
|
607
597
|
|
608
|
-
|
609
|
-
|
610
|
-
|
611
|
-
|
612
|
-
|
598
|
+
for_attribute(:force_dash, displays_as: :forcedash, with_namespace: :o) do
|
599
|
+
good_tf_values.each do |good_value|
|
600
|
+
with_value(good_value) do
|
601
|
+
it_should_assign_successfully
|
602
|
+
it_should_output "<v:rect o:forcedash=\"#{good_value}\"/>"
|
603
|
+
end
|
613
604
|
end
|
614
|
-
end
|
615
605
|
|
616
|
-
|
617
|
-
|
606
|
+
with_values(bad_tf_values) do
|
607
|
+
it_should_raise_an_exception
|
608
|
+
end
|
618
609
|
end
|
619
|
-
end
|
620
610
|
|
621
|
-
|
622
|
-
|
623
|
-
|
624
|
-
|
625
|
-
|
611
|
+
for_attribute(:hr, with_namespace: :o) do
|
612
|
+
good_tf_values.each do |good_value|
|
613
|
+
with_value(good_value) do
|
614
|
+
it_should_assign_successfully
|
615
|
+
it_should_output "<v:rect o:hr=\"#{good_value}\"/>"
|
616
|
+
end
|
626
617
|
end
|
627
|
-
end
|
628
618
|
|
629
|
-
|
630
|
-
|
619
|
+
with_values(bad_tf_values) do
|
620
|
+
it_should_raise_an_exception
|
621
|
+
end
|
631
622
|
end
|
632
|
-
end
|
633
623
|
|
634
|
-
|
635
|
-
|
636
|
-
|
637
|
-
|
638
|
-
|
624
|
+
for_attribute(:hr_no_shade, displays_as: :hrnoshade, with_namespace: :o) do
|
625
|
+
good_tf_values.each do |good_value|
|
626
|
+
with_value(good_value) do
|
627
|
+
it_should_assign_successfully
|
628
|
+
it_should_output "<v:rect o:hrnoshade=\"#{good_value}\"/>"
|
629
|
+
end
|
639
630
|
end
|
640
|
-
end
|
641
631
|
|
642
|
-
|
643
|
-
|
632
|
+
with_values(bad_tf_values) do
|
633
|
+
it_should_raise_an_exception
|
634
|
+
end
|
644
635
|
end
|
645
|
-
end
|
646
636
|
|
647
|
-
|
648
|
-
|
649
|
-
|
650
|
-
|
651
|
-
|
637
|
+
for_attribute(:hr_standard, displays_as: :hrstd, with_namespace: :o) do
|
638
|
+
good_tf_values.each do |good_value|
|
639
|
+
with_value(good_value) do
|
640
|
+
it_should_assign_successfully
|
641
|
+
it_should_output "<v:rect o:hrstd=\"#{good_value}\"/>"
|
642
|
+
end
|
652
643
|
end
|
653
|
-
end
|
654
644
|
|
655
|
-
|
656
|
-
|
645
|
+
with_values(bad_tf_values) do
|
646
|
+
it_should_raise_an_exception
|
647
|
+
end
|
657
648
|
end
|
658
|
-
end
|
659
649
|
|
660
|
-
|
661
|
-
|
662
|
-
|
663
|
-
|
664
|
-
|
650
|
+
for_attribute(:ole, with_namespace: :o) do
|
651
|
+
good_tf_values.each do |good_value|
|
652
|
+
with_value(good_value) do
|
653
|
+
it_should_assign_successfully
|
654
|
+
it_should_output "<v:rect o:ole=\"#{good_value}\"/>"
|
655
|
+
end
|
665
656
|
end
|
666
|
-
end
|
667
657
|
|
668
|
-
|
669
|
-
|
658
|
+
with_values(bad_tf_values) do
|
659
|
+
it_should_raise_an_exception
|
660
|
+
end
|
670
661
|
end
|
671
|
-
end
|
672
662
|
|
673
|
-
|
674
|
-
|
675
|
-
|
676
|
-
|
677
|
-
|
663
|
+
for_attribute(:ole_icon, displays_as: :oleicon, with_namespace: :o) do
|
664
|
+
good_tf_values.each do |good_value|
|
665
|
+
with_value(good_value) do
|
666
|
+
it_should_assign_successfully
|
667
|
+
it_should_output "<v:rect o:oleicon=\"#{good_value}\"/>"
|
668
|
+
end
|
678
669
|
end
|
679
|
-
end
|
680
670
|
|
681
|
-
|
682
|
-
|
671
|
+
with_values(bad_tf_values) do
|
672
|
+
it_should_raise_an_exception
|
673
|
+
end
|
683
674
|
end
|
684
|
-
end
|
685
675
|
|
686
|
-
|
687
|
-
|
688
|
-
|
689
|
-
|
690
|
-
|
676
|
+
for_attribute(:hide_extra_handles, displays_as: :oned, with_namespace: :o) do
|
677
|
+
good_tf_values.each do |good_value|
|
678
|
+
with_value(good_value) do
|
679
|
+
it_should_assign_successfully
|
680
|
+
it_should_output "<v:rect o:oned=\"#{good_value}\"/>"
|
681
|
+
end
|
691
682
|
end
|
692
|
-
end
|
693
683
|
|
694
|
-
|
695
|
-
|
684
|
+
with_values(bad_tf_values) do
|
685
|
+
it_should_raise_an_exception
|
686
|
+
end
|
696
687
|
end
|
697
|
-
end
|
698
688
|
|
699
|
-
|
700
|
-
|
701
|
-
|
702
|
-
|
703
|
-
|
689
|
+
for_attribute(:prefer_relative, displays_as: :preferrelative, with_namespace: :o) do
|
690
|
+
good_tf_values.each do |good_value|
|
691
|
+
with_value(good_value) do
|
692
|
+
it_should_assign_successfully
|
693
|
+
it_should_output "<v:rect o:preferrelative=\"#{good_value}\"/>"
|
694
|
+
end
|
704
695
|
end
|
705
|
-
end
|
706
696
|
|
707
|
-
|
708
|
-
|
697
|
+
with_values(bad_tf_values) do
|
698
|
+
it_should_raise_an_exception
|
699
|
+
end
|
709
700
|
end
|
710
|
-
end
|
711
701
|
|
712
|
-
|
713
|
-
|
714
|
-
|
715
|
-
|
716
|
-
|
702
|
+
for_attribute(:user_drawn, displays_as: :userdrawn, with_namespace: :o) do
|
703
|
+
good_tf_values.each do |good_value|
|
704
|
+
with_value(good_value) do
|
705
|
+
it_should_assign_successfully
|
706
|
+
it_should_output "<v:rect o:userdrawn=\"#{good_value}\"/>"
|
707
|
+
end
|
717
708
|
end
|
718
|
-
end
|
719
709
|
|
720
|
-
|
721
|
-
|
710
|
+
with_values(bad_tf_values) do
|
711
|
+
it_should_raise_an_exception
|
712
|
+
end
|
722
713
|
end
|
723
|
-
end
|
724
714
|
|
725
|
-
|
726
|
-
|
727
|
-
|
728
|
-
|
729
|
-
|
715
|
+
for_attribute(:user_hidden, displays_as: :userhidden, with_namespace: :o) do
|
716
|
+
good_tf_values.each do |good_value|
|
717
|
+
with_value(good_value) do
|
718
|
+
it_should_assign_successfully
|
719
|
+
it_should_output "<v:rect o:userhidden=\"#{good_value}\"/>"
|
720
|
+
end
|
730
721
|
end
|
731
|
-
end
|
732
722
|
|
733
|
-
|
734
|
-
|
723
|
+
with_values(bad_tf_values) do
|
724
|
+
it_should_raise_an_exception
|
725
|
+
end
|
735
726
|
end
|
736
727
|
end
|
737
728
|
|
738
|
-
|
739
729
|
end
|