Sha256: 2e7a480e0a73466aac5f0abbc9be29f631896850ea1e0c80c994a4d34617ef76

Contents?: true

Size: 1.31 KB

Versions: 5

Compression:

Stored size: 1.31 KB

Contents

require File.join(File.dirname(__FILE__), %w[.. .. spec_helper])

describe Feedzirra::Parser::AtomFeedBurner do
  describe "#will_parse?" do
    it "should return true for a feedburner atom feed" do
      Feedzirra::Parser::AtomFeedBurner.should be_able_to_parse(sample_feedburner_atom_feed)
    end
    
    it "should return false for an rdf feed" do
      Feedzirra::Parser::AtomFeedBurner.should_not be_able_to_parse(sample_rdf_feed)
    end
    
    it "should return false for a regular atom feed" do
      Feedzirra::Parser::AtomFeedBurner.should_not be_able_to_parse(sample_atom_feed)
    end
  end

  describe "parsing" do
    before(:each) do
      @feed = Feedzirra::Parser::AtomFeedBurner.parse(sample_feedburner_atom_feed)
    end
    
    it "should parse the title" do
      @feed.title.should == "Paul Dix Explains Nothing"
    end

    it "should parse the description" do
      @feed.description.should == "Entrepreneurship, programming, software development, politics, NYC, and random thoughts."
    end

    it "should parse the url" do
      @feed.url.should == "http://www.pauldix.net/"
    end
    
    it "should parse the feed_url" do
      @feed.feed_url.should == "http://feeds.feedburner.com/PaulDixExplainsNothing"
    end
    
    it "should parse entries" do
      @feed.entries.size.should == 5
    end
  end
end

Version data entries

5 entries across 5 versions & 2 rubygems

Version Path
localist-feedzirra-0.2.1 spec/feedzirra/parser/atom_feed_burner_spec.rb
feedzirra-0.1.1 spec/feedzirra/parser/atom_feed_burner_spec.rb
feedzirra-0.1.0 spec/feedzirra/parser/atom_feed_burner_spec.rb
feedzirra-0.0.31 spec/feedzirra/parser/atom_feed_burner_spec.rb
feedzirra-0.0.30 spec/feedzirra/parser/atom_feed_burner_spec.rb