Sha256: 927fc0b0fcaaaf1ef0e388bccece54d432e409cd58bf4fda5953f179b33a858d

Contents?: true

Size: 1.31 KB

Versions: 13

Compression:

Stored size: 1.31 KB

Contents

require 'test/unit'
require 'feed_tools'

class AtomTest < Test::Unit::TestCase
  def setup
    FeedTools.tidy_enabled = false
  end

  def test_feed_title
    feed = FeedTools::Feed.open(
      'http://feedparser.org/tests/wellformed/atom/atom_namespace_1.xml')
    assert_equal("Example Atom", feed.title)
    assert_equal(false, feed.bozo?)
    feed = FeedTools::Feed.open(
      'http://feedparser.org/tests/wellformed/atom/atom_namespace_2.xml')
    assert_equal("Example Atom", feed.title)
    assert_equal(false, feed.bozo?)
    feed = FeedTools::Feed.open(
      'http://feedparser.org/tests/wellformed/atom/atom_namespace_3.xml')
    assert_equal("Example Atom", feed.title)
    assert_equal(false, feed.bozo?)
    feed = FeedTools::Feed.open(
      'http://feedparser.org/tests/wellformed/atom/atom_namespace_4.xml')
    assert_equal("Example Atom", feed.title)
    assert_equal(false, feed.bozo?)
    feed = FeedTools::Feed.open(
      'http://feedparser.org/tests/wellformed/atom/atom_namespace_5.xml')
    assert_equal("Example Atom", feed.title)
    assert_equal(false, feed.bozo?)    
  end
  
  def test_feed_author
#    feed = FeedTools::Feed.open(
#      'http://feedparser.org/tests/wellformed/atom/atom_namespace_5.xml')
#    assert_equal("Example Atom", feed.title)
#    assert_equal(false, feed.bozo?)    
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
feedtools-0.2.11 test/atom_test.rb
feedtools-0.2.13 test/atom_test.rb
feedtools-0.2.12 test/atom_test.rb
feedtools-0.2.10 test/atom_test.rb
feedtools-0.2.14 test/atom_test.rb
feedtools-0.2.2 test/atom_test.rb
feedtools-0.2.6 test/atom_test.rb
feedtools-0.2.7 test/atom_test.rb
feedtools-0.2.8 test/atom_test.rb
feedtools-0.2.9 test/atom_test.rb
feedtools-0.2.4 test/atom_test.rb
feedtools-0.2.3 test/atom_test.rb
feedtools-0.2.5 test/atom_test.rb