require "spec_helper"
describe "The Section Builder" do
let(:builder) do
inputs = [
[1, [""]],
[1, [""]],
[2, ["a
"]],
[2, ["b
"]],
[2, ["c
"]],
[1, [""]]
]
Brief::Document::Section::Builder.new(inputs)
end
it "collapses the HTML into sections for us" do
expect(builder.to_fragment.css("section h1").count).to eq(3)
expect(builder.to_fragment.css("section article").count).to eq(3)
end
end