spec/grid_spec.rb in inky-rb-1.3.8.0 vs spec/grid_spec.rb in inky-rb-1.4.2.0
- old
+ new
@@ -59,16 +59,16 @@
it 'creates a single column with default large and small classes' do
input = '<columns>One</columns>'
expected = <<-HTML
<th class="small-12 large-12 columns first last">
- <table>
+ <table><tbody>
<tr>
<th>One</th>
<th class="expander"></th>
</tr>
- </table>
+ </tbody></table>
</th>
HTML
compare(input, expected)
end
@@ -82,16 +82,16 @@
end
input = '<columns>One</columns>'
expected = <<-HTML
<th class="small-5 large-5 columns first last">
- <table>
+ <table><tbody>
<tr>
<th>One</th>
<th class="expander"></th>
</tr>
- </table>
+ </tbody></table>
</th>
HTML
compare(input, expected)
ensure
@@ -103,16 +103,16 @@
it 'creates a single column with first and last classes' do
input = '<columns large="12" small="12">One</columns>'
expected = <<-HTML
<th class="small-12 large-12 columns first last">
- <table>
+ <table><tbody>
<tr>
<th>One</th>
<th class="expander"></th>
</tr>
- </table>
+ </tbody></table>
</th>
HTML
compare(input, expected)
end
@@ -125,22 +125,22 @@
</body>
INKY
expected = <<-HTML
<body>
<th class="small-12 large-6 columns first">
- <table>
+ <table><tbody>
<tr>
<th>One</th>
</tr>
- </table>
+ </tbody></table>
</th>
<th class="small-12 large-6 columns last">
- <table>
+ <table><tbody>
<tr>
<th>Two</th>
</tr>
- </table>
+ </tbody></table>
</th>
</body>
HTML
compare(input, expected)
@@ -155,29 +155,29 @@
</body>
INKY
expected = <<-INKY
<body>
<th class="small-12 large-4 columns first">
- <table>
+ <table><tbody>
<tr>
<th>One</th>
</tr>
- </table>
+ </tbody></table>
</th>
<th class="small-12 large-4 columns">
- <table>
+ <table><tbody>
<tr>
<th>Two</th>
</tr>
- </table>
+ </tbody></table>
</th>
<th class="small-12 large-4 columns last">
- <table>
+ <table><tbody>
<tr>
<th>Three</th>
</tr>
- </table>
+ </tbody></table>
</th>
</body>
INKY
compare(input, expected)
@@ -185,16 +185,16 @@
it 'transfers classes to the final HTML' do
input = '<columns class="small-offset-8 hide-for-small">One</columns>'
expected = <<-HTML
<th class="small-12 large-12 columns small-offset-8 hide-for-small first last">
- <table>
+ <table><tbody>
<tr>
<th>One</th>
<th class="expander"></th>
</tr>
- </table>
+ </tbody></table>
</th>
HTML
compare(input, expected)
end
@@ -208,22 +208,22 @@
</body>
HTML
expected = <<-INKY
<body>
<th class="small-4 large-4 columns first">
- <table>
+ <table><tbody>
<tr>
<th>One</th>
</tr>
- </table>
+ </tbody></table>
</th>
<th class="small-8 large-8 columns last">
- <table>
+ <table><tbody>
<tr>
<th>Two</th>
</tr>
- </table>
+ </tbody></table>
</th>
</body>
INKY
compare(input, expected)
@@ -237,22 +237,22 @@
</body>
INKY
expected = <<-HTML
<body>
<th class="small-12 large-4 columns first">
- <table>
+ <table><tbody>
<tr>
<th>One</th>
</tr>
- </table>
+ </tbody></table>
</th>
<th class="small-12 large-8 columns last">
- <table>
+ <table><tbody>
<tr>
<th>Two</th>
</tr>
- </table>
+ </tbody></table>
</th>
</body>
HTML
compare(input, expected)
@@ -266,22 +266,22 @@
</body>
INKY
expected = <<-HTML
<body>
<th class="small-12 large-6 columns first">
- <table>
+ <table><tbody>
<tr>
<th>One</th>
</tr>
- </table>
+ </tbody></table>
</th>
<th class="small-12 large-6 columns last">
- <table>
+ <table><tbody>
<tr>
<th>Two</th>
</tr>
- </table>
+ </tbody></table>
</th>
</body>
HTML
compare(input, expected)
@@ -292,21 +292,21 @@
expected = <<-HTML
<table class="row">
<tbody>
<tr>
<th class="small-12 large-12 columns first last">
- <table>
+ <table><tbody>
<tr>
<th>
<table class="row">
<tbody>
<tr></tr>
</tbody>
</table>
</th>
</tr>
- </table>
+ </tbody></table>
</th>
</tr>
</tbody>
</table>
HTML
@@ -316,17 +316,17 @@
it 'transfers attributes like valign' do
input = '<columns small="6" valign="middle" foo="bar">x</columns>'
expected = <<-HTML
<th class="small-6 large-6 columns first last" valign="middle" foo="bar">
- <table>
+ <table><tbody>
<tr>
<th>
x
</th>
</tr>
- </table>
+ </tbody></table>
</th>
HTML
compare(input, expected)
end
@@ -334,23 +334,23 @@
RSpec.describe 'Block Grid' do
it 'returns the correct block grid syntax' do
input = '<block-grid up="4"></block-grid>'
expected = <<-HTML
- <table class="block-grid up-4">
+ <table class="block-grid up-4"><tbody>
<tr></tr>
- </table>
+ </tbody></table>
HTML
compare(input, expected)
end
it 'copies classes to the final HTML output' do
input = '<block-grid up="4" class="show-for-large"></block-grid>'
expected = <<-HTML
- <table class="block-grid up-4 show-for-large">
+ <table class="block-grid up-4 show-for-large"><tbody>
<tr></tr>
- </table>
+ </tbody></table>
HTML
compare(input, expected)
end
end