Sha256: 70dd5e4a7f9314500931ff9d2aa1360247963f40d43bcc0c350792aa8ced2a3d
Contents?: true
Size: 678 Bytes
Versions: 1
Compression:
Stored size: 678 Bytes
Contents
# frozen_string_literal: true require File.join(File.dirname(__FILE__), '/../spec_helper') describe RssParser do include RssParser it 'should throw exception if rss_feed is not 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
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
twog-0.3.6 | spec/twog/rss_parser_spec.rb |