inky-rb 1.3.7.3 → 1.4.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (69) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +1 -0
  3. data/.rubocop.yml +3 -0
  4. data/.travis.yml +4 -2
  5. data/README.md +1 -1
  6. data/gemfiles/rails_6.gemfile +5 -0
  7. data/inky.gemspec +6 -6
  8. data/lib/inky/component_factory.rb +21 -9
  9. data/lib/inky/configuration.rb +22 -1
  10. data/lib/inky/rails/template_handler.rb +7 -3
  11. data/lib/inky/rails/version.rb +1 -1
  12. data/lib/inky.rb +5 -2
  13. data/spec/_cases_output/button/no_link.inky +1 -0
  14. data/spec/_cases_output/button/with_expand_class.inky +4 -0
  15. data/spec/_cases_output/button/with_extra_attr.inky +3 -0
  16. data/spec/_cases_output/button/with_image.inky +3 -0
  17. data/spec/_cases_output/button/with_link.inky +3 -0
  18. data/spec/_cases_output/button/with_link_and_extra_attr.inky +3 -0
  19. data/spec/_cases_output/button/with_tricky_class.inky +22 -0
  20. data/spec/_cases_output/callout/basic.inky +1 -0
  21. data/spec/_cases_output/callout/with_attributes.inky +3 -0
  22. data/spec/_cases_output/general/empty_attributes.inky +6 -0
  23. data/spec/_cases_output/general/multiple_root.inky +2 -0
  24. data/spec/_cases_output/general/no_tag.inky +1 -0
  25. data/spec/_cases_output/general/root_within_text.inky +7 -0
  26. data/spec/_cases_output/general/void_html_elements.inky +6 -0
  27. data/spec/_cases_output/grid/columns.inky +2 -0
  28. data/spec/_cases_output/grid/container.inky +1 -0
  29. data/spec/_cases_output/grid/container_with_align.inky +1 -0
  30. data/spec/_cases_output/grid/row.inky +1 -0
  31. data/spec/_cases_output/grid/row_with_columns.inky +5 -0
  32. data/spec/_cases_output/h_line/basic.inky +1 -0
  33. data/spec/_cases_output/h_line/h_line.inky +2 -0
  34. data/spec/_cases_output/h_line/multiple.inky +3 -0
  35. data/spec/_cases_output/h_line/with_attr.inky +1 -0
  36. data/spec/_cases_output/menu/item.inky +1 -0
  37. data/spec/_cases_output/menu/menu.inky +2 -0
  38. data/spec/_cases_output/menu/menu_with_align.inky +2 -0
  39. data/spec/_cases_output/menu/menu_with_items.inky +5 -0
  40. data/spec/_cases_output/spacer/basic.inky +5 -0
  41. data/spec/_cases_output/spacer/with_attr.inky +6 -0
  42. data/spec/_cases_output/spacer/with_size.inky +5 -0
  43. data/spec/_cases_output/spacer/with_size_lg.inky +5 -0
  44. data/spec/_cases_output/spacer/with_size_sm.inky +5 -0
  45. data/spec/_cases_output/spacer/with_size_sm_and_lg.inky +5 -0
  46. data/spec/_cases_output/spacer/with_sizes_and_attr.inky +6 -0
  47. data/spec/_cases_output/wrapper/basic.inky +1 -0
  48. data/spec/_cases_output/wrapper/with_align.inky +1 -0
  49. data/spec/_cases_output/wrapper/with_attributes.inky +1 -0
  50. data/spec/cases/button/with_extra_attr.inky +3 -0
  51. data/spec/cases/button/with_link.inky +1 -1
  52. data/spec/cases/button/with_link_and_extra_attr.inky +3 -0
  53. data/spec/cases/h_line/basic.inky +1 -0
  54. data/spec/cases/h_line/multiple.inky +8 -0
  55. data/spec/cases/h_line/with_attr.inky +2 -0
  56. data/spec/cases/spacer/with_attr.inky +6 -0
  57. data/spec/cases/spacer/with_size.inky +1 -1
  58. data/spec/cases/spacer/with_size_lg.inky +1 -1
  59. data/spec/cases/spacer/with_size_sm.inky +1 -1
  60. data/spec/cases/spacer/with_size_sm_and_lg.inky +1 -1
  61. data/spec/cases/spacer/with_sizes_and_attr.inky +6 -0
  62. data/spec/components_spec.rb +48 -48
  63. data/spec/configuration_spec.rb +92 -22
  64. data/spec/grid_spec.rb +38 -38
  65. data/spec/spec_helper.rb +4 -1
  66. data/spec/test_app/log/test.log +5405 -0
  67. data/spec/test_app/spec/features/inky_spec.rb +3 -3
  68. metadata +165 -78
  69. data/Gemfile.lock +0 -188
@@ -31,19 +31,19 @@ RSpec.describe "Center" do
31
31
 
32
32
  expected = <<-HTML
33
33
  <center>
34
- <table class="float-center menu " align="center">
34
+ <table class="float-center menu " align="center"><tbody>
35
35
  <tr>
36
36
  <td>
37
- <table>
37
+ <table><tbody>
38
38
  <tr>
39
39
  <th class="float-center menu-item">
40
40
  <a href="#"></a>
41
41
  </th>
42
42
  </tr>
43
- </table>
43
+ </tbody></table>
44
44
  </td>
45
45
  </tr>
46
- </table>
46
+ </tbody></table>
47
47
  </center>
48
48
  HTML
49
49
 
@@ -55,17 +55,17 @@ RSpec.describe "Button" do
55
55
  it "creates a simple button" do
56
56
  input = '<button href="http://zurb.com">Button</button>'
57
57
  expected = <<-HTML
58
- <table class="button">
58
+ <table class="button"><tbody>
59
59
  <tr>
60
60
  <td>
61
- <table>
61
+ <table><tbody>
62
62
  <tr>
63
63
  <td><a href="http://zurb.com">Button</a></td>
64
64
  </tr>
65
- </table>
65
+ </tbody></table>
66
66
  </td>
67
67
  </tr>
68
- </table>
68
+ </tbody></table>
69
69
  HTML
70
70
  compare(input, expected)
71
71
  end
@@ -73,17 +73,17 @@ RSpec.describe "Button" do
73
73
  it 'creates a button with target="_blank" attribute' do
74
74
  input = '<button href="http://zurb.com" target="_blank">Button</button>'
75
75
  expected = <<-HTML
76
- <table class="button">
76
+ <table class="button"><tbody>
77
77
  <tr>
78
78
  <td>
79
- <table>
79
+ <table><tbody>
80
80
  <tr>
81
81
  <td><a href="http://zurb.com" target="_blank">Button</a></td>
82
82
  </tr>
83
- </table>
83
+ </tbody></table>
84
84
  </td>
85
85
  </tr>
86
- </table>
86
+ </tbody></table>
87
87
  HTML
88
88
  compare(input, expected)
89
89
  end
@@ -91,17 +91,17 @@ RSpec.describe "Button" do
91
91
  it 'creates a button with classes' do
92
92
  input = '<button class="small alert" href="http://zurb.com">Button</button>'
93
93
  expected = <<-HTML
94
- <table class="button small alert">
94
+ <table class="button small alert"><tbody>
95
95
  <tr>
96
96
  <td>
97
- <table>
97
+ <table><tbody>
98
98
  <tr>
99
99
  <td><a href="http://zurb.com">Button</a></td>
100
100
  </tr>
101
- </table>
101
+ </tbody></table>
102
102
  </td>
103
103
  </tr>
104
- </table>
104
+ </tbody></table>
105
105
  HTML
106
106
 
107
107
  compare(input, expected)
@@ -110,20 +110,20 @@ RSpec.describe "Button" do
110
110
  it 'creates a correct expanded button' do
111
111
  input = '<button class="expand" href="http://zurb.com">Button</button>'
112
112
  expected = <<-HTML
113
- <table class="button expand">
113
+ <table class="button expand"><tbody>
114
114
  <tr>
115
115
  <td>
116
- <table>
116
+ <table><tbody>
117
117
  <tr>
118
118
  <td>
119
119
  <center><a href="http://zurb.com" align="center" class="float-center">Button</a></center>
120
120
  </td>
121
121
  </tr>
122
- </table>
122
+ </tbody></table>
123
123
  </td>
124
124
  <td class="expander"></td>
125
125
  </tr>
126
- </table>
126
+ </tbody></table>
127
127
  HTML
128
128
 
129
129
  compare(input, expected)
@@ -138,17 +138,17 @@ RSpec.describe "Menu" do
138
138
  </menu>
139
139
  INKY
140
140
  expected = <<-HTML
141
- <table class="menu">
141
+ <table class="menu"><tbody>
142
142
  <tr>
143
143
  <td>
144
- <table>
144
+ <table><tbody>
145
145
  <tr>
146
146
  <th class="menu-item"><a href="http://zurb.com">Item</a></th>
147
147
  </tr>
148
- </table>
148
+ </tbody></table>
149
149
  </td>
150
150
  </tr>
151
- </table>
151
+ </tbody></table>
152
152
  HTML
153
153
 
154
154
  compare(input, expected)
@@ -161,17 +161,17 @@ RSpec.describe "Menu" do
161
161
  </menu>
162
162
  INKY
163
163
  expected = <<-HTML
164
- <table class="menu">
164
+ <table class="menu"><tbody>
165
165
  <tr>
166
166
  <td>
167
- <table>
167
+ <table><tbody>
168
168
  <tr>
169
169
  <th class="menu-item"><a href="http://zurb.com" target="_blank">Item</a></th>
170
170
  </tr>
171
- </table>
171
+ </tbody></table>
172
172
  </td>
173
173
  </tr>
174
- </table>
174
+ </tbody></table>
175
175
  HTML
176
176
 
177
177
  compare(input, expected)
@@ -183,16 +183,16 @@ RSpec.describe "Menu" do
183
183
  </menu>
184
184
  INKY
185
185
  expected = <<-HTML
186
- <table class="menu vertical">
186
+ <table class="menu vertical"><tbody>
187
187
  <tr>
188
188
  <td>
189
- <table>
189
+ <table><tbody>
190
190
  <tr>
191
191
  </tr>
192
- </table>
192
+ </tbody></table>
193
193
  </td>
194
194
  </tr>
195
- </table>
195
+ </tbody></table>
196
196
  HTML
197
197
 
198
198
  compare(input, expected)
@@ -205,17 +205,17 @@ RSpec.describe "Menu" do
205
205
  </menu>
206
206
  INKY
207
207
  expected = <<-HTML
208
- <table class="menu">
208
+ <table class="menu"><tbody>
209
209
  <tr>
210
210
  <td>
211
- <table>
211
+ <table><tbody>
212
212
  <tr>
213
213
  <th class="menu-item"><a href="http://zurb.com">Item 1</a></th>
214
214
  </tr>
215
- </table>
215
+ </tbody></table>
216
216
  </td>
217
217
  </tr>
218
- </table>
218
+ </tbody></table>
219
219
  HTML
220
220
 
221
221
  compare(input, expected)
@@ -226,12 +226,12 @@ RSpec.describe "Callout" do
226
226
  it "creates a callout with correct syntax" do
227
227
  input = '<callout>Callout</callout>'
228
228
  expected = <<-HTML
229
- <table class="callout">
229
+ <table class="callout"><tbody>
230
230
  <tr>
231
231
  <th class="callout-inner">Callout</th>
232
232
  <th class="expander"></th>
233
233
  </tr>
234
- </table>
234
+ </tbody></table>
235
235
  HTML
236
236
 
237
237
  compare(input, expected)
@@ -240,12 +240,12 @@ RSpec.describe "Callout" do
240
240
  it "copies classes to the final HTML" do
241
241
  input = '<callout class="primary">Callout</callout>'
242
242
  expected = <<-HTML
243
- <table class="callout">
243
+ <table class="callout"><tbody>
244
244
  <tr>
245
245
  <th class="callout-inner primary">Callout</th>
246
246
  <th class="expander"></th>
247
247
  </tr>
248
- </table>
248
+ </tbody></table>
249
249
  HTML
250
250
 
251
251
  compare(input, expected)
@@ -259,7 +259,7 @@ RSpec.describe "Spacer" do
259
259
  <table class="spacer">
260
260
  <tbody>
261
261
  <tr>
262
- <td height="10px" style="font-size:10px;line-height:10px;">&#xA0;</td>
262
+ <td height="10" style="font-size:10px;line-height:10px;">&nbsp;</td>
263
263
  </tr>
264
264
  </tbody>
265
265
  </table>
@@ -274,7 +274,7 @@ RSpec.describe "Spacer" do
274
274
  <table class="spacer hide-for-large">
275
275
  <tbody>
276
276
  <tr>
277
- <td height="10px" style="font-size:10px;line-height:10px;">&#xA0;</td>
277
+ <td height="10" style="font-size:10px;line-height:10px;">&nbsp;</td>
278
278
  </tr>
279
279
  </tbody>
280
280
  </table>
@@ -289,7 +289,7 @@ RSpec.describe "Spacer" do
289
289
  <table class="spacer show-for-large">
290
290
  <tbody>
291
291
  <tr>
292
- <td height="20px" style="font-size:20px;line-height:20px;">&#xA0;</td>
292
+ <td height="20" style="font-size:20px;line-height:20px;">&nbsp;</td>
293
293
  </tr>
294
294
  </tbody>
295
295
  </table>
@@ -304,14 +304,14 @@ RSpec.describe "Spacer" do
304
304
  <table class="spacer hide-for-large">
305
305
  <tbody>
306
306
  <tr>
307
- <td height="10px" style="font-size:10px;line-height:10px;">&#xA0;</td>
307
+ <td height="10" style="font-size:10px;line-height:10px;">&nbsp;</td>
308
308
  </tr>
309
309
  </tbody>
310
310
  </table>
311
311
  <table class="spacer show-for-large">
312
312
  <tbody>
313
313
  <tr>
314
- <td height="20px" style="font-size:20px;line-height:20px;">&#xA0;</td>
314
+ <td height="20" style="font-size:20px;line-height:20px;">&nbsp;</td>
315
315
  </tr>
316
316
  </tbody>
317
317
  </table>
@@ -326,7 +326,7 @@ RSpec.describe "Spacer" do
326
326
  <table class="spacer bgcolor">
327
327
  <tbody>
328
328
  <tr>
329
- <td height="10px" style="font-size:10px;line-height:10px;">&#xA0;</td>
329
+ <td height="10" style="font-size:10px;line-height:10px;">&nbsp;</td>
330
330
  </tr>
331
331
  </tbody>
332
332
  </table>
@@ -340,11 +340,11 @@ RSpec.describe "Wrapper" do
340
340
  it 'creates a wrapper that you can attach classes to' do
341
341
  input = '<wrapper class="header"></wrapper>'
342
342
  expected = <<-HTML
343
- <table class="wrapper header" align="center">
343
+ <table class="wrapper header" align="center"><tbody>
344
344
  <tr>
345
345
  <td class="wrapper-inner"></td>
346
346
  </tr>
347
- </table>
347
+ </tbody></table>
348
348
  HTML
349
349
 
350
350
  compare(input, expected)
@@ -1,44 +1,114 @@
1
1
  require 'spec_helper'
2
2
 
3
- RSpec.describe "Configuration" do
4
- around do |spec|
5
- Inky.configure do |config|
6
- old = config.template_engine
7
- spec.run
8
- config.template_engine = old
3
+ RSpec.describe "Inky.configuration" do
4
+ it "returns an Inky::Configuration object" do
5
+ expect(Inky.configuration).to be_an_instance_of Inky::Configuration
6
+ end
7
+
8
+ describe "=" do
9
+ it "accepts an Inky::Configuration" do
10
+ current_config = Inky.configuration
11
+ config = Inky::Configuration.new
12
+
13
+ expect { Inky.configuration = config }.to_not raise_error
14
+ expect(Inky.configuration).to_not eq(current_config)
15
+ expect(Inky.configuration).to eq(config)
16
+
17
+ expect { Inky.configuration = {} }.to raise_error(TypeError, "Not an Inky::Configuration")
18
+ expect(Inky.configuration).to eq(config)
19
+
20
+ expect { Inky.configuration = current_config }.to_not raise_error
21
+ expect(Inky.configuration).to eq(current_config)
9
22
  end
10
23
  end
11
24
 
12
- it "default value is :erb" do
13
- Inky::Configuration.new.template_engine = :erb
25
+ describe "&block" do
26
+ it "yields the current configuration" do
27
+ current_config = Inky.configuration
28
+ new_config = Inky::Configuration.new
29
+
30
+ Inky.configuration = new_config
31
+
32
+ Inky.configuration do |config|
33
+ expect(config).to be_an_instance_of Inky::Configuration
34
+ expect(config).to_not eq(current_config)
35
+ expect(config).to eq(new_config)
36
+ end
37
+
38
+ Inky.configuration = current_config
39
+ end
40
+ end
41
+ end
42
+
43
+ RSpec.describe "Configuration" do
44
+ describe "#template_engine" do
45
+ it "default value is :erb" do
46
+ expect(Inky::Configuration.new.template_engine).to eq(:erb)
47
+ end
14
48
  end
15
49
 
16
- describe "#configuration=" do
17
- it "can set template_engine" do
50
+ describe "#template_engine=" do
51
+ it "sets/updates the template_engine" do
18
52
  config = Inky::Configuration.new
19
53
  config.template_engine = :haml
20
54
  expect(config.template_engine).to eq(:haml)
21
55
  end
22
56
 
23
- it "can set column_count" do
57
+ it "accepts symbols" do
24
58
  config = Inky::Configuration.new
25
- config.column_count = 4
26
- expect(config.column_count).to eq(4)
59
+ value = []
60
+ expect { config.template_engine = value }.to raise_error(TypeError, "#{value.inspect} (#{value.class}) does not respond to 'to_sym'")
61
+ expect(config.template_engine).to eq(:erb)
27
62
  end
28
63
  end
29
64
 
30
- describe "#configuration=" do
31
- before do
32
- Inky.configure do |config|
33
- config.template_engine = :haml
34
- end
65
+ describe "#column_count" do
66
+ it "default value is 12" do
67
+ expect(Inky::Configuration.new.column_count).to eq(12)
35
68
  end
69
+ end
36
70
 
37
- it "returns :haml as configured template_engine" do
38
- template_engine = Inky.configuration.template_engine
71
+ describe "#column_count=" do
72
+ it "sets/updates the column_count" do
73
+ config = Inky::Configuration.new
74
+ config.column_count = 24
75
+ expect(config.column_count).to eq(24)
76
+ end
39
77
 
40
- expect(template_engine).to be_a(Symbol)
41
- expect(template_engine).to eq(:haml)
78
+ it "accepts integers" do
79
+ config = Inky::Configuration.new
80
+ value = :haml
81
+ expect { config.column_count = value }.to raise_error(TypeError, "#{value.inspect} (#{value.class}) does not respond to 'to_int'")
82
+ expect(config.column_count).to eq(12)
83
+ end
84
+ end
85
+
86
+ describe "#components" do
87
+ it "defaults to an empty hash" do
88
+ config = Inky::Configuration.new
89
+ expect(config.components).to eq({})
90
+ end
91
+ end
92
+
93
+ describe "#components=" do
94
+ it "can set overriden component tags" do
95
+ config = Inky::Configuration.new
96
+ config.components = { button: 'inky-button' }
97
+ expect(config.components).to eq(button: 'inky-button')
98
+ end
99
+
100
+ it "will not set an invalid components override" do
101
+ config = Inky::Configuration.new
102
+ [
103
+ nil,
104
+ 1,
105
+ "{}",
106
+ false,
107
+ true
108
+ ].each do |value|
109
+ expect { config.components = value }.to raise_error(TypeError, "#{value.inspect} (#{value.class}) does not respond to 'to_hash'")
110
+ expect(config.components).to eq({})
111
+ end
42
112
  end
43
113
  end
44
114
  end
data/spec/grid_spec.rb CHANGED
@@ -61,12 +61,12 @@ RSpec.describe 'Grid' do
61
61
  input = '<columns>One</columns>'
62
62
  expected = <<-HTML
63
63
  <th class="small-12 large-12 columns first last">
64
- <table>
64
+ <table><tbody>
65
65
  <tr>
66
66
  <th>One</th>
67
67
  <th class="expander"></th>
68
68
  </tr>
69
- </table>
69
+ </tbody></table>
70
70
  </th>
71
71
  HTML
72
72
 
@@ -84,12 +84,12 @@ RSpec.describe 'Grid' do
84
84
  input = '<columns>One</columns>'
85
85
  expected = <<-HTML
86
86
  <th class="small-5 large-5 columns first last">
87
- <table>
87
+ <table><tbody>
88
88
  <tr>
89
89
  <th>One</th>
90
90
  <th class="expander"></th>
91
91
  </tr>
92
- </table>
92
+ </tbody></table>
93
93
  </th>
94
94
  HTML
95
95
 
@@ -105,12 +105,12 @@ RSpec.describe 'Grid' do
105
105
  input = '<columns large="12" small="12">One</columns>'
106
106
  expected = <<-HTML
107
107
  <th class="small-12 large-12 columns first last">
108
- <table>
108
+ <table><tbody>
109
109
  <tr>
110
110
  <th>One</th>
111
111
  <th class="expander"></th>
112
112
  </tr>
113
- </table>
113
+ </tbody></table>
114
114
  </th>
115
115
  HTML
116
116
 
@@ -127,18 +127,18 @@ RSpec.describe 'Grid' do
127
127
  expected = <<-HTML
128
128
  <body>
129
129
  <th class="small-12 large-6 columns first">
130
- <table>
130
+ <table><tbody>
131
131
  <tr>
132
132
  <th>One</th>
133
133
  </tr>
134
- </table>
134
+ </tbody></table>
135
135
  </th>
136
136
  <th class="small-12 large-6 columns last">
137
- <table>
137
+ <table><tbody>
138
138
  <tr>
139
139
  <th>Two</th>
140
140
  </tr>
141
- </table>
141
+ </tbody></table>
142
142
  </th>
143
143
  </body>
144
144
  HTML
@@ -157,25 +157,25 @@ RSpec.describe 'Grid' do
157
157
  expected = <<-INKY
158
158
  <body>
159
159
  <th class="small-12 large-4 columns first">
160
- <table>
160
+ <table><tbody>
161
161
  <tr>
162
162
  <th>One</th>
163
163
  </tr>
164
- </table>
164
+ </tbody></table>
165
165
  </th>
166
166
  <th class="small-12 large-4 columns">
167
- <table>
167
+ <table><tbody>
168
168
  <tr>
169
169
  <th>Two</th>
170
170
  </tr>
171
- </table>
171
+ </tbody></table>
172
172
  </th>
173
173
  <th class="small-12 large-4 columns last">
174
- <table>
174
+ <table><tbody>
175
175
  <tr>
176
176
  <th>Three</th>
177
177
  </tr>
178
- </table>
178
+ </tbody></table>
179
179
  </th>
180
180
  </body>
181
181
  INKY
@@ -187,12 +187,12 @@ RSpec.describe 'Grid' do
187
187
  input = '<columns class="small-offset-8 hide-for-small">One</columns>'
188
188
  expected = <<-HTML
189
189
  <th class="small-12 large-12 columns small-offset-8 hide-for-small first last">
190
- <table>
190
+ <table><tbody>
191
191
  <tr>
192
192
  <th>One</th>
193
193
  <th class="expander"></th>
194
194
  </tr>
195
- </table>
195
+ </tbody></table>
196
196
  </th>
197
197
  HTML
198
198
 
@@ -210,18 +210,18 @@ RSpec.describe 'Grid' do
210
210
  expected = <<-INKY
211
211
  <body>
212
212
  <th class="small-4 large-4 columns first">
213
- <table>
213
+ <table><tbody>
214
214
  <tr>
215
215
  <th>One</th>
216
216
  </tr>
217
- </table>
217
+ </tbody></table>
218
218
  </th>
219
219
  <th class="small-8 large-8 columns last">
220
- <table>
220
+ <table><tbody>
221
221
  <tr>
222
222
  <th>Two</th>
223
223
  </tr>
224
- </table>
224
+ </tbody></table>
225
225
  </th>
226
226
  </body>
227
227
  INKY
@@ -239,18 +239,18 @@ RSpec.describe 'Grid' do
239
239
  expected = <<-HTML
240
240
  <body>
241
241
  <th class="small-12 large-4 columns first">
242
- <table>
242
+ <table><tbody>
243
243
  <tr>
244
244
  <th>One</th>
245
245
  </tr>
246
- </table>
246
+ </tbody></table>
247
247
  </th>
248
248
  <th class="small-12 large-8 columns last">
249
- <table>
249
+ <table><tbody>
250
250
  <tr>
251
251
  <th>Two</th>
252
252
  </tr>
253
- </table>
253
+ </tbody></table>
254
254
  </th>
255
255
  </body>
256
256
  HTML
@@ -268,18 +268,18 @@ RSpec.describe 'Grid' do
268
268
  expected = <<-HTML
269
269
  <body>
270
270
  <th class="small-12 large-6 columns first">
271
- <table>
271
+ <table><tbody>
272
272
  <tr>
273
273
  <th>One</th>
274
274
  </tr>
275
- </table>
275
+ </tbody></table>
276
276
  </th>
277
277
  <th class="small-12 large-6 columns last">
278
- <table>
278
+ <table><tbody>
279
279
  <tr>
280
280
  <th>Two</th>
281
281
  </tr>
282
- </table>
282
+ </tbody></table>
283
283
  </th>
284
284
  </body>
285
285
  HTML
@@ -294,7 +294,7 @@ RSpec.describe 'Grid' do
294
294
  <tbody>
295
295
  <tr>
296
296
  <th class="small-12 large-12 columns first last">
297
- <table>
297
+ <table><tbody>
298
298
  <tr>
299
299
  <th>
300
300
  <table class="row">
@@ -304,7 +304,7 @@ RSpec.describe 'Grid' do
304
304
  </table>
305
305
  </th>
306
306
  </tr>
307
- </table>
307
+ </tbody></table>
308
308
  </th>
309
309
  </tr>
310
310
  </tbody>
@@ -318,13 +318,13 @@ RSpec.describe 'Grid' do
318
318
  input = '<columns small="6" valign="middle" foo="bar">x</columns>'
319
319
  expected = <<-HTML
320
320
  <th class="small-6 large-6 columns first last" valign="middle" foo="bar">
321
- <table>
321
+ <table><tbody>
322
322
  <tr>
323
323
  <th>
324
324
  x
325
325
  </th>
326
326
  </tr>
327
- </table>
327
+ </tbody></table>
328
328
  </th>
329
329
  HTML
330
330
 
@@ -336,9 +336,9 @@ RSpec.describe 'Block Grid' do
336
336
  it 'returns the correct block grid syntax' do
337
337
  input = '<block-grid up="4"></block-grid>'
338
338
  expected = <<-HTML
339
- <table class="block-grid up-4">
339
+ <table class="block-grid up-4"><tbody>
340
340
  <tr></tr>
341
- </table>
341
+ </tbody></table>
342
342
  HTML
343
343
 
344
344
  compare(input, expected)
@@ -347,9 +347,9 @@ RSpec.describe 'Block Grid' do
347
347
  it 'copies classes to the final HTML output' do
348
348
  input = '<block-grid up="4" class="show-for-large"></block-grid>'
349
349
  expected = <<-HTML
350
- <table class="block-grid up-4 show-for-large">
350
+ <table class="block-grid up-4 show-for-large"><tbody>
351
351
  <tr></tr>
352
- </table>
352
+ </tbody></table>
353
353
  HTML
354
354
 
355
355
  compare(input, expected)