Tests for XML::TreeBuilder#on_comment.

This commit is contained in:
Yorick Peterse committed 2014-04-03 09:38:18 +02:00
1 parent bdb76cefc5
commit 0f129ceac9
1 file changed
+15
+15
View File
@@ -47,6 +47,21 @@ describe Oga::XML::TreeBuilder do
end
end
context '#on_comment' do
before do
node = s(:comment, 'foo')
@tag = @builder.process(node)
end
example 'return a Comment node' do
@tag.is_a?(Oga::XML::Comment).should == true
end
example 'include the text of the comment' do
@tag.text.should == 'foo'
end
end
context '#on_element' do
context 'simple elements' do
before do