Sha256: 60e1f4d5a992f79159d9b2fe551fe33cf88708d9d60ccaa91a12db84cd7fcc7c

Contents?: true

Size: 958 Bytes

Versions: 1

Compression:

Stored size: 958 Bytes

Contents

require File.dirname(__FILE__) + "/spec_helper"

describe Feediscovery do
  
  describe "feeds from " do
    
    before(:all) do
      @feeds = Feediscovery.extract("http://blog.superfeedr.com/")
    end
    
    it "should extract 1 feed from http://blog.superfeedr.com/" do
      @feeds.should have(1).element
    end
    
    describe "the feed from " do
      it "should have the right href" do
        @feeds.first.href.should == "http://blog.superfeedr.com/atom.xml"
      end

      it "should have the right rel" do
        @feeds.first.rel.should == "alternate"
      end

      it "should have the right type" do
        @feeds.first.type.should == "application/atom+xml"
      end

      it "should have the right title" do
        @feeds.first.title.should == "Superfeedr' thoughts"
      end
    end
  end
  
  it "should return an empty array if the url has no feeds" do
    Feediscovery.extract("http://google.com/").should == []
  end
  
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
feediscovery-1.0.0 spec/feediscovery_spec.rb