Created
April 23, 2009 04:32
-
-
Save maliqq/100312 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# test/html/test_element.rb | |
module Nokogiri | |
module HTML | |
class TestElement < Nokogiri::TestCase | |
def test_line | |
html = Nokogiri::HTML(<<-eohtml) | |
<html> | |
<head> | |
<title>title</title> | |
</head> | |
<body> | |
Hello world | |
</body> | |
</html> | |
eohtml | |
assert_equal html.search("/html/head/title")[0], 3 | |
assert_equal html.search("/html/body")[0], 5 | |
end | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment