rspec/rspec-core — pull request #1420 by cupakromer (2014-03-21 04:18:17+00:00)
Title: Force Nokogiri to format meaningful whitespace.

It is still unclear why some systems successfully match the fixture with
the generated HTML, while others fail. However, according to the
following resources, Nokogiri is whitespace sensitive:

- https://groups.google.com/forum/#!topic/nokogiri-talk/P6p46mnhERE
- https://stackoverflow.com/questions/3886059

To quote the above resources:

> In XML, whitespace can be considered meaningful. If you parse a
> document that contains whitespace nodes, libxml2 will assume that
> whitespace nodes are meaningful and will not insert them for you.
>
> You can tell libxml2 that whitespace is not meaningful by passing the
> "noblanks" flag to the parser.

Here we use the block form and tell Nokogiri to run `noblanks` on the
result. We also could pass in the options in the args, but that would
require a more verbose call to handle the unused args:

Nokogiri::HTML(
html,
_url = nil,
_encoding = nil,
Nokogiri::XML::ParseOptions::NOBLANKS
)