I hereby claim:
- I am schustafa on github.
- I am schustafa (https://keybase.io/schustafa) on keybase.
- I have a public key whose fingerprint is 0ED8 339B 0B06 43A9 9A40 835D 82F0 9367 A1A4 56B5
To claim this, I am signing this object:
Heidelberg |
I hereby claim:
To claim this, I am signing this object:
# Credit: http://johnleach.co.uk/words/585/testing-xml-with-rspec-xpath-and-libxml | |
require 'libxml' | |
RSpec::Matchers.define :have_xml do |xpath, text| | |
match do |body| | |
parser = LibXML::XML::Parser.string body | |
doc = parser.parse | |
nodes = doc.find(xpath) | |
nodes.empty?.should be_false |