subject(:document) do
parse_html '<div>Some <span>text</span> with <span>whitespace</span></div>'
end
it 'matches simple strings' do
expect(document.div).to match_text 'Some text with whitespace'
end
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<html><body>
<div>Some <span>text</span> with <span>whitespace</span>
</div>
</body></html>
Some text with whitespace