Skip to content

Instantly share code, notes, and snippets.

<!DOCTYPE html>
<meta charset="UTF-8">
<title>True Trello Printer</title>
<link href="" rel="stylesheet">
pimpin / have_xml.rb
Last active November 30, 2022 17:37 — forked from faun/have_xml.rb
require 'nokogiri'
RSpec::Matchers.define :have_xml do |xpath, text|
match do |body|
doc = Nokogiri::XML::Document.parse(body)
nodes = doc.xpath(xpath)
expect(nodes).to_not be_empty
if text
nodes.each do |node|
cdata = node.children.find { |e| e.cdata? }
value_to_check = node.text
pimpin /
Last active January 4, 2016 19:19 — forked from Wallsays/
Bootstrap Ruby & Chef Solo for Ubuntu 12.04 LTS 64 bit with the command `curl -l | bash`
#!/usr/bin/env bash
sudo apt-get -y update
# Install dependencies
sudo apt-get -y install build-essential zlib1g-dev libssl-dev libreadline-dev libyaml-dev
# Install Ruby 1.9.3 from source
sudo wget
sudo tar -xvzf ruby-1.9.3-p194.tar.gz
cd ruby-1.9.3-p194/
sudo ./configure --prefix=/usr/local