diff --git a/spec/oga/xml/lexer/html_closing_rules/colgroup_spec.rb b/spec/oga/xml/lexer/html_closing_rules/colgroup_spec.rb
index 79837b5..cc0bf41 100644
--- a/spec/oga/xml/lexer/html_closing_rules/colgroup_spec.rb
+++ b/spec/oga/xml/lexer/html_closing_rules/colgroup_spec.rb
@@ -1,8 +1,8 @@
require 'spec_helper'
describe Oga::XML::Lexer do
- describe 'HTML colgroup elements' do
- it 'lexes an unclosed
followed by another ' do
+ describe 'using HTML elements' do
+ it 'lexes two unclosed elements as separate elements' do
lex_html('foobar').should == [
[:T_ELEM_NAME, 'colgroup', 1],
[:T_TEXT, 'foo', 1],
@@ -12,5 +12,23 @@ describe Oga::XML::Lexer do
[:T_ELEM_END, nil, 1]
]
end
+
+ it 'lexes a element following a as a child element' do
+ lex_html('').should == [
+ [:T_ELEM_NAME, 'colgroup', 1],
+ [:T_ELEM_NAME, 'col', 1],
+ [:T_ELEM_END, nil, 1],
+ [:T_ELEM_END, nil, 1]
+ ]
+ end
+
+ it 'lexes a element following a as a child element' do
+ lex_html('').should == [
+ [:T_ELEM_NAME, 'colgroup', 1],
+ [:T_ELEM_NAME, 'template', 1],
+ [:T_ELEM_END, nil, 1],
+ [:T_ELEM_END, nil, 1]
+ ]
+ end
end
end