Sha256: 06d470795048b0c1aa82f6b9523415903c909a83bcc50ce8a17244306bd0f1da

Contents?: true

Size: 1.55 KB

Versions: 11

Compression:

Stored size: 1.55 KB

Contents

require File.join(File.dirname(__FILE__), %w[.. .. spec_helper])

describe Feedzirra::Parser::AtomEntry do
  before do
    # I don't really like doing it this way because these unit test should only rely on AtomEntry,
    # but this is actually how it should work. You would never just pass entry xml straight to the AtomEnry
    @entry = Feedzirra::Parser::Atom.parse(sample_atom_feed).entries.first
  end
  
  it "should parse the title" do
    @entry.title.should == "AWS Job: Architect & Designer Position in Turkey"
  end
  
  it "should parse the url" do
    @entry.url.should == "http://aws.typepad.com/aws/2009/01/aws-job-architect-designer-position-in-turkey.html"
  end
  
  it "should parse the author" do
    @entry.author.should == "AWS Editor"
  end
  
  it "should parse the content" do
    @entry.content.should == sample_atom_entry_content
  end
  
  it "should provide a summary" do
    @entry.summary.should == "Late last year an entrepreneur from Turkey visited me at Amazon HQ in Seattle. We talked about his plans to use AWS as part of his new social video portal startup. I won't spill any beans before he's ready to..."
  end
  
  it "should parse the published date" do
    @entry.published.to_s.should == "Fri Jan 16 18:21:00 UTC 2009"
  end

  it "should parse the categories" do
    @entry.categories.should == ['Turkey', 'Seattle']
  end
  
  it "should parse the updated date" do
    @entry.updated.to_s.should == "Fri Jan 16 18:21:00 UTC 2009"
  end
  
  it "should parse the id" do
    @entry.id.should == "tag:typepad.com,2003:post-61484736"
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
jsl-feedzirra-0.0.12.1 spec/feedzirra/parser/atom_entry_spec.rb
jsl-feedzirra-0.0.12.10 spec/feedzirra/parser/atom_entry_spec.rb
jsl-feedzirra-0.0.12.12 spec/feedzirra/parser/atom_entry_spec.rb
jsl-feedzirra-0.0.12.2 spec/feedzirra/parser/atom_entry_spec.rb
jsl-feedzirra-0.0.12.3 spec/feedzirra/parser/atom_entry_spec.rb
jsl-feedzirra-0.0.12.4 spec/feedzirra/parser/atom_entry_spec.rb
jsl-feedzirra-0.0.12.5 spec/feedzirra/parser/atom_entry_spec.rb
jsl-feedzirra-0.0.12.6 spec/feedzirra/parser/atom_entry_spec.rb
jsl-feedzirra-0.0.12.7 spec/feedzirra/parser/atom_entry_spec.rb
jsl-feedzirra-0.0.12.8 spec/feedzirra/parser/atom_entry_spec.rb
jsl-feedzirra-0.0.12.9 spec/feedzirra/parser/atom_entry_spec.rb