Fixed issue with h- class elements being evaluated multiple times
This commit is contained in:
parent
b35a24becc
commit
9777b76b46
3 changed files with 23 additions and 29 deletions
|
@ -19,19 +19,9 @@ class TestMicroformats2 < Test::Unit::TestCase
|
|||
end
|
||||
|
||||
def test_extracts_hcard_from_an_html_file
|
||||
hcard = <<-END
|
||||
<html>
|
||||
<head>
|
||||
<title>Simple hCard</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<h1 class="h-card">Chris</h1>
|
||||
</body>
|
||||
</html>
|
||||
END
|
||||
result = Microformats2.parse(File.open(File.join(File.dirname(__FILE__), "simple.html")))
|
||||
assert_equal HCard, result[:hcard].first.class
|
||||
assert_equal 2, result[:hcard].length
|
||||
end
|
||||
|
||||
def test_extracts_hcard_from_html
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue