public
Description: Yet Another Planet Refactoring
Homepage: http://intertwingly.net/blog/2007/12/19/Yet-Another-Planet-Refactoring
Clone URL: git://github.com/rubys/mars.git
Search Repo:
Sam Ruby (author)
Thu Apr 03 17:55:30 -0700 2008
commit  594cd30192668c6310b3236b978d5d4a6d706fb7
tree    fb2c98375a3f69e66dc22da049a8c7e26438d717
parent  775bc2a397c7812ae67b9979f288c3c835aab059
mars / test / sift.rb
100644 14 lines (12 sloc) 0.459 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
require 'test/unit'
require 'planet/sift'
 
class SiftTestCase < Test::Unit::TestCase
  ATOMNS = 'xmlns="http://www.w3.org/2005/Atom"'
 
  def test_empty_formatting_elements
    # http://github.com/bronson/mars/commit/775bc2a397c7812ae67b9979f288c3c835aab059
    title = "<title type='html' #{ATOMNS}>&lt;i/&gt;</title>"
    doc = Planet::XmlParser.parse(title)
    Planet.sift doc, nil
    assert_equal '<i></i>', doc.elements['title/div'].to_a.join
  end
end