require 'test/unit' require 'feed_tools' class HelperTest < Test::Unit::TestCase def setup FeedTools.tidy_enabled = false end def test_escape_entities end def test_unescape_entities end def test_normalize_url assert_equal("http://slashdot.org/", FeedTools.normalize_url("slashdot.org")) end def test_sanitize_html end def test_tidy_html FeedTools.tidy_enabled = true unless FeedTools.tidy_enabled? puts "\nCould not test tidy support. Libtidy couldn't be found." end FeedTools.tidy_enabled = false end def test_build_urn_uri assert_equal("urn:uuid:fa6d0b87-3f36-517d-b9b7-1349f8c3fc6b", FeedTools.build_urn_uri('http://sporkmonger.com/')) end end