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