Tests for XML::TreeBuilder#on_comment.
This commit is contained in:
parent
bdb76cefc5
commit
0f129ceac9
|
@ -47,6 +47,21 @@ describe Oga::XML::TreeBuilder do
|
||||||
end
|
end
|
||||||
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 '#on_element' do
|
||||||
context 'simple elements' do
|
context 'simple elements' do
|
||||||
before do
|
before do
|
||||||
|
|
Loading…
Reference in New Issue