Sha256: 2e01b1c0d496bd4438c090a997d31b74b890bd81c72e87c2c767bf751b4a7789
Contents?: true
Size: 471 Bytes
Versions: 7
Compression:
Stored size: 471 Bytes
Contents
require 'spec_helper' RSpec.describe 'Element#prepend' do html <<-HTML <div id="foo"></div> <div id="bar"> <p>Something</p> </div> HTML it 'inserts the given html to beginning of element' do foo = Element.find '#foo' bar = Element.find '#bar' foo.prepend '<span>Bore Da</span>' expect(foo.children.first.text).to eq 'Bore Da' bar.prepend '<span>Charlie</span>' expect(bar.children.first.text).to eq 'Charlie' end end
Version data entries
7 entries across 7 versions & 1 rubygems