Sha256: 93df6625102094311cf9486950a1da5d14c7859c4173f4a37552bb89c54d6fd8
Contents?: true
Size: 665 Bytes
Versions: 282
Compression:
Stored size: 665 Bytes
Contents
require "helper" module Nokogiri module XML class TestComment < Nokogiri::TestCase def setup super @xml = Nokogiri::XML.parse(File.read(XML_FILE), XML_FILE) end def test_new comment = Nokogiri::XML::Comment.new(@xml, 'hello world') assert_equal('<!--hello world-->', comment.to_s) end def test_comment? comment = Nokogiri::XML::Comment.new(@xml, 'hello world') assert(comment.comment?) assert(!@xml.root.comment?) end def test_many_comments 100.times { Nokogiri::XML::Comment.new(@xml, 'hello world') } end end end end
Version data entries
282 entries across 282 versions & 27 rubygems