element closed using a element' do - lex_html('
foo').should == [ + expect(lex_html('
foo')).to eq([ [:T_ELEM_NAME, 'p', 1], [:T_TEXT, 'foo', 1], [:T_ELEM_END, nil, 1] - ] + ]) end it 'lexes a element' do - lex_html('').should == [ + expect(lex_html('')).to eq([ [:T_ELEM_NAME, 'object', 1], [:T_ELEM_NAME, 'param', 1], [:T_ELEM_END, nil, 1], [:T_ELEM_NAME, 'param', 1], [:T_ELEM_END, nil, 1], [:T_ELEM_END, nil, 1] - ] + ]) end end end diff --git a/spec/oga/html/lexer/closing_rules/body_spec.rb b/spec/oga/html/lexer/closing_rules/body_spec.rb index c732205..e565438 100644 --- a/spec/oga/html/lexer/closing_rules/body_spec.rb +++ b/spec/oga/html/lexer/closing_rules/body_spec.rb @@ -3,35 +3,35 @@ require 'spec_helper' describe Oga::XML::Lexer do describe 'using HTML
elements' do it 'lexes an unclosed followed by a as separate elements' do - lex_html('foobar').should == [ + expect(lex_html('foobar')).to eq([ [:T_ELEM_NAME, 'body', 1], [:T_TEXT, 'foo', 1], [:T_ELEM_END, nil, 1], [:T_ELEM_NAME, 'head', 1], [:T_TEXT, 'bar', 1], [:T_ELEM_END, nil, 1] - ] + ]) end it 'lexes an unclosed followed by a as separate elements' do - lex_html('foobar').should == [ + expect(lex_html('foobar')).to eq([ [:T_ELEM_NAME, 'body', 1], [:T_TEXT, 'foo', 1], [:T_ELEM_END, nil, 1], [:T_ELEM_NAME, 'body', 1], [:T_TEXT, 'bar', 1], [:T_ELEM_END, nil, 1] - ] + ]) end it 'lexes afollowing an unclosed
as a child element' do - lex_html('foo').should == [ + expect(lex_html('
foo')).to eq([ [:T_ELEM_NAME, 'body', 1], [:T_ELEM_NAME, 'p', 1], [:T_TEXT, 'foo', 1], [:T_ELEM_END, nil, 1], [:T_ELEM_END, nil, 1] - ] + ]) end end end diff --git a/spec/oga/html/lexer/closing_rules/caption_spec.rb b/spec/oga/html/lexer/closing_rules/caption_spec.rb index 037cabf..9428d2d 100644 --- a/spec/oga/html/lexer/closing_rules/caption_spec.rb +++ b/spec/oga/html/lexer/closing_rules/caption_spec.rb @@ -3,79 +3,79 @@ require 'spec_helper' describe Oga::XML::Lexer do describe 'using HTML