Sha256: d2c1feb15038cb90551590c7d3abfe2fe75790979e719d6c442c9a4a01d7d0b5
Contents?: true
Size: 1.56 KB
Versions: 5
Compression:
Stored size: 1.56 KB
Contents
require File.join(File.dirname(__FILE__), %w[.. .. spec_helper]) describe Feedzirra::Parser::Atom do describe "#will_parse?" do it "should return true for an atom feed" do Feedzirra::Parser::Atom.should be_able_to_parse(sample_atom_feed) end it "should return false for an rdf feed" do Feedzirra::Parser::Atom.should_not be_able_to_parse(sample_rdf_feed) end end describe "parsing" do before(:each) do @feed = Feedzirra::Parser::Atom.parse(sample_atom_feed) end it "should parse the title" do @feed.title.should == "Amazon Web Services Blog" end it "should parse the description" do @feed.description.should == "Amazon Web Services, Products, Tools, and Developer Information..." end it "should parse the url" do @feed.url.should == "http://aws.typepad.com/aws/" end it "should parse the url even when it doesn't have the type='text/html' attribute" do Feedzirra::Parser::Atom.parse(load_sample("atom_with_link_tag_for_url_unmarked.xml")).url.should == "http://www.innoq.com/planet/" end it "should parse the feed_url even when it doesn't have the type='application/atom+xml' attribute" do Feedzirra::Parser::Atom.parse(load_sample("atom_with_link_tag_for_url_unmarked.xml")).feed_url.should == "http://www.innoq.com/planet/atom.xml" end it "should parse the feed_url" do @feed.feed_url.should == "http://aws.typepad.com/aws/atom.xml" end it "should parse entries" do @feed.entries.size.should == 10 end end end
Version data entries
5 entries across 5 versions & 2 rubygems