File: interface_test.rb

package info (click to toggle)
ruby-feedtools 0.2.29%2Bdfsg1-5
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 2,008 kB
  • sloc: ruby: 18,815; sql: 39; makefile: 13
file content (34 lines) | stat: -rw-r--r-- 903 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
require 'test/unit'
require 'feed_tools'
require 'feed_tools/helpers/feed_tools_helper'

class InterfaceTest < Test::Unit::TestCase
  def setup
    FeedTools.reset_configurations
    FeedTools.configurations[:tidy_enabled] = false
    FeedTools.configurations[:feed_cache] = "FeedTools::DatabaseFeedCache"
    FeedTools::FeedToolsHelper.default_local_path = 
      File.expand_path(
        File.expand_path(File.dirname(__FILE__)) + '/../feeds')
  end

  def test_feed_interface
    # These will throw an exception if missing, obviously
    feed = FeedTools::Feed.new
    feed.title
    feed.subtitle
    feed.description
    feed.link
    feed.entries
    feed.items
  end
  
  def test_feed_item_interface
    # These will throw an exception if missing, obviously
    feed_item = FeedTools::FeedItem.new
    feed_item.title
    feed_item.content
    feed_item.description
    feed_item.link
  end
end