Class TestText
In: test.rb
Parent: Test::Unit::TestCase

TestText provides unit test cases for the text function described above.

One parse method is defined to take care of the small bit of administrivia necessary. The remainder are the actual test cases, and all begin with the string "test_". Each invokes the parse method with a given feed, and makes an assertion on what the expected results are.

Methods

Public Instance methods

The parse method takes care of the following:

  • parsing the feed as XML
  • finding the first content element
  • extracting the text from it

test content with an non-xml and non-text mime type

test content with no type attribute specified (default="text")

test content with type="html"

test out-of-line content

test content with type="text"

test content with type="xhtml"

test content with an xml mime type

[Validate]