probably this is more RSpec style:
```ruby
expect(Nokogiri::HTML(processed_html).xpath('//h2')).to have(1).item
```