Sha256: add3d1106df688c72ef45e26826d0808afcd31332638b030d7014de80c493d5b

Contents?: true

Size: 644 Bytes

Versions: 3

Compression:

Stored size: 644 Bytes

Contents

require File.join(File.dirname(__FILE__), "/../spec_helper")

describe RssParser do
  include RssParser

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

  it "should read the rss_feed_url and parse the items" do
    allow(self).to receive(:get_content).and_return(rss_feed_url_content)
    items = parse_feed('http://tinyurl.com')
    expect(items.length).to eq(1)
    expect(items[0].title.strip).to eq("Gocode Vim Plugin and Go Modules")
    expect(items[0].link.strip).to eq("https://blog.jasonmeridth.com/posts/gocode-vim-plugin-and-go-modules/")
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
twog-0.3.5 spec/twog/rss_parser_spec.rb
twog-0.3.4 spec/twog/rss_parser_spec.rb
twog-0.3.3 spec/twog/rss_parser_spec.rb