Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

79 lines (59 sloc) 1.72 kb
require "rubygems"
require "rspec"
# gem install redgreen for colored test output
begin require "redgreen" unless ENV['TM_CURRENT_LINE']; rescue LoadError; end
path = File.expand_path(File.dirname(__FILE__) + "/../lib/")
$LOAD_PATH.unshift(path) unless $LOAD_PATH.include?(path)
require "feedzirra"
def load_sample(filename)
File.read("#{File.dirname(__FILE__)}/sample_feeds/#{filename}")
end
def sample_atom_feed
load_sample("AmazonWebServicesBlog.xml")
end
def sample_atom_entry_content
load_sample("AmazonWebServicesBlogFirstEntryContent.xml")
end
def sample_itunes_feed
load_sample("itunes.xml")
end
def sample_rdf_feed
load_sample("HREFConsideredHarmful.xml")
end
def sample_rdf_entry_content
load_sample("HREFConsideredHarmfulFirstEntry.xml")
end
def sample_rss_feed_burner_feed
load_sample("TechCrunch.xml")
end
def sample_rss_feed_burner_entry_content
load_sample("TechCrunchFirstEntry.xml")
end
def sample_rss_feed_burner_entry_description
load_sample("TechCrunchFirstEntryDescription.xml")
end
def sample_rss_feed
load_sample("TenderLovemaking.xml")
end
def sample_rss_entry_content
load_sample("TenderLovemakingFirstEntry.xml")
end
def sample_feedburner_atom_feed
load_sample("PaulDixExplainsNothing.xml")
end
def sample_feedburner_atom_entry_content
load_sample("PaulDixExplainsNothingFirstEntryContent.xml")
end
def sample_wfw_feed
load_sample("PaulDixExplainsNothingWFW.xml")
end
def sample_google_docs_list_feed
load_sample("GoogleDocsList.xml")
end
# http://eigenclass.org/hiki/Changes+in+Ruby+1.9#l156
# Default Time.to_s changed in 1.9, monkeypatching it back
class Time
def to_s
strftime("%a %b %d %H:%M:%S %Z %Y")
end
end
Jump to Line
Something went wrong with that request. Please try again.