Created
March 17, 2011 03:42
-
-
Save flippyhead/873794 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require 'spec_helper' | |
| describe Feeds::EntryBuilder do | |
| let(:entry_xml){FixtureHelper.read_fixture('entry.xml')} | |
| let(:entries_xml){FixtureHelper.read_fixture('entries.xml')} | |
| describe 'when creating from superfeedr XML' do | |
| describe 'single entry xml' do | |
| subject{Feeds::EntryBuilder.normalize_superfeedr(entry_xml).entries.first} | |
| its(:summary){should be_blank} | |
| its(:content){should include('Rothenberg is out as head of product for Flickr.')} | |
| its(:content){should_not include('a href="http://twitter.com')} | |
| its(:published_at){should == DateTime.parse('2011-03-14T23:48:43Z').utc} | |
| end | |
| describe 'multiple entry xml' do | |
| subject{Feeds::Entry.create_from(entries_xml).entries.first} | |
| its(:summary){should include('When you ask Yahoo who is in charge of Flickr, they always point to one man')} | |
| its(:summary){should_not include('a href="http://twitter.com')} | |
| its(:published_at){should == DateTime.parse('2011-03-14T23:48:43Z').utc} | |
| end | |
| end | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment