Sha256: d00426138f74bb97017522c26a36a3f4abe3699ff17f6cc87918eb6b55e9640f

Contents?: true

Size: 585 Bytes

Versions: 4

Compression:

Stored size: 585 Bytes

Contents

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

describe RssParser do 
  include TwogSpecHelper
  include RssParser

  it "should throw exception if rss_feed isn't provided" do
    lambda { parse(nil) }.should raise_error('RSS feed missing')
  end

  it "should read the rss_feed_url and parse the items" do
    self.stub!(:open).and_return(rss_feed_url_content)
    items = parse(test_conf)
    items.length.should == 1
    items[0].title.content.should == "Pair Programming"
    items[0].link.href.should == "http://blog.jasonmeridth.com/2009/01/29/pair-programming.html"
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
twog-0.3.0 spec/rss_parser_spec.rb
twog-0.2.2 spec/rss_parser_spec.rb
twog-0.2.1 spec/rss_parser_spec.rb
twog-0.2.0 spec/rss_parser_spec.rb