require 'spec_helper'
RSpec.describe "Container" do
it "creates a container table" do
input = ''
expected = <<-HTML
HTML
compare(input, expected)
end
it 'works when parsing a full HTML document' do
input = <<-INKY
INKY
expected = <<-HTML
HTML
compare(input, expected)
end
end
RSpec.describe 'Grid' do
it 'creates a row' do
input = '
'
expected = <<-HTML
HTML
compare(input, expected)
end
it 'creates a single column with first and last classes' do
input = 'One'
expected = <<-HTML
|
HTML
compare(input, expected)
end
it 'creates two columns, one first, one last' do
input = <<-INKY
One
Two
INKY
expected = <<-HTML
|
|
HTML
compare(input, expected)
end
it 'creates 3+ columns, first is first, last is last' do
input = <<-INKY
One
Two
Three
INKY
expected = <<-INKY
|
|
|
INKY
compare(input, expected)
end
it 'transfers classes to the final HTML' do
input = 'One'
expected = <<-HTML
|
HTML
compare(input, expected)
end
#if it just has small, borrow from small for large
it 'automatically assigns large columns if no large attribute is assigned' do
input = <<-HTML
One
Two
HTML
expected = <<-INKY
|
|
INKY
compare(input, expected)
end
it 'automatically assigns small columns as full width if only large defined' do
input = <<-INKY
One
Two
INKY
expected = <<-HTML
|
|
HTML
compare(input, expected)
end
it 'supports nested grids' do
input = '|
'
expected = <<-HTML
HTML
compare(input, expected)
end
end
RSpec.describe 'Block Grid' do
it 'returns the correct block grid syntax' do
input = ''
expected = <<-HTML
HTML
compare(input, expected)
end
it 'copies classes to the final HTML output' do
input = ''
expected = <<-HTML
HTML
compare(input, expected)
end
end