Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Readded updated_at/pubDate for Rss2

Was lost in rebase

Thanks namelessjon
  • Loading branch information...
commit 3e4073fa5a6e8ae9ebbd13288f174ae9439425de 1 parent 517c879
@jnicklas jnicklas authored
Showing with 4 additions and 4 deletions.
  1. +1 −1  lib/feed_me/item_parser.rb
  2. +3 −3 spec/item_parser_spec.rb
View
2  lib/feed_me/item_parser.rb
@@ -14,7 +14,7 @@ class AtomItemParser < ItemParser
class Rss2ItemParser < ItemParser
property :title
- property :updated_at, :path => :undefined
+ property :updated_at, :path => :pubDate, :as => :time
property :item_id, :path => :guid
property :url, :path => :link
property :content, :path => :description
View
6 spec/item_parser_spec.rb
@@ -52,8 +52,8 @@
@atom.updated_at.should == Time.utc( 2008, 3, 7, 20, 41, 10 )
end
- it "should be nil for an rss2 feed" do
- @rss2.updated_at.should be_nil
+ it "should be valid for an rss2 feed" do
+ @rss2.updated_at.should == Time.utc(2003, 6, 3, 9, 39, 21)
end
end
@@ -132,7 +132,7 @@
end
it "should serialize updated_at for an rss2 feed" do
- @rss2.to_hash[:updated_at].should be_nil
+ @rss2.to_hash[:updated_at].should == Time.utc(2003, 6, 3, 9, 39, 21)
end
it "should serialize the url for an rss2 feed" do
Please sign in to comment.
Something went wrong with that request. Please try again.