Skip to content

Instantly share code, notes, and snippets.

View schustafa's full-sized avatar

AJ Schuster schustafa

View GitHub Profile
@schustafa
schustafa / bergs.txt
Last active January 19, 2021 15:20
Burgs in Pennsylvania
Heidelberg

Keybase proof

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:

# 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