Sha256: 32ca5ab3586041f0319026b71aea571052d6ebe23874d632b131b77437308953
Contents?: true
Size: 597 Bytes
Versions: 1
Compression:
Stored size: 597 Bytes
Contents
require 'rpub' require 'nokogiri' FIXTURES_DIRECTORY = File.expand_path('../fixtures', __FILE__) RSpec::Matchers.define :remove_file do |filename| match do |block| before = File.exist?(filename) block.call after = File.exist?(filename) before && !after end end RSpec::Matchers.define :create_file do |filename| match do |block| before = File.exist?(filename) block.call after = File.exist?(filename) !before && after end end RSpec::Matchers.define :have_xpath do |xpath, *args| match do |xml| Nokogiri::XML(xml).xpath(xpath, *args).any? end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
rpub-0.2.0 | spec/spec_helper.rb |