Sha256: 53083b6b3aa18aba2d0360a66d4540aaa00b55c3f640786654ea24728ea19f0f

Contents?: true

Size: 607 Bytes

Versions: 1

Compression:

Stored size: 607 Bytes

Contents

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

describe Twog::RssParser do 
  include TwogSpecHelper
  include Twog::RssParser

  it "should throw exception if rss_feed isn't provided" do
    lambda { parse_feed(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_feed(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

1 entries across 1 versions & 1 rubygems

Version Path
twog-0.3.1 spec/rss_parser_spec.rb