Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

37 lines (31 sloc) 0.967 kB
require 'test_helper'
class FeedbagTest < Test::Unit::TestCase
context "Feedbag.feed? should know that an RSS url is a feed" do
setup do
@rss_url = 'http://example.com/rss/'
Feedbag.stubs(:find).with(@rss_url).returns([@rss_url])
end
should "return true" do
assert Feedbag.feed?(@rss_url)
end
end
context "Feedbag.feed? should know that an RSS url with parameters is a feed" do
setup do
@rss_url = "http://example.com/data?format=rss"
Feedbag.stubs(:find).with(@rss_url).returns([@rss_url])
end
should "return true" do
assert Feedbag.feed?(@rss_url)
end
end
context "Feedbag find should discover feeds containing atom:link" do
setup do
@feeds = ['http://jenniferlynch.wordpress.com/feed', 'http://lurenbijdeburen.wordpress.com/feed']
end
should "find atom feed" do
@feeds.each do |url|
assert_equal [url], Feedbag.find(url)
end
end
end
end
Jump to Line
Something went wrong with that request. Please try again.