Sha256: 001b883d32847ea37735f9ef1e423548e4f1de8432af94acb3fb89f6999f0891
Contents?: true
Size: 465 Bytes
Versions: 3
Compression:
Stored size: 465 Bytes
Contents
require 'spec_helper' 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
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
opal-jquery-0.4.2 | spec/element/prepend_spec.rb |
opal-jquery-0.4.1 | spec/element/prepend_spec.rb |
opal-jquery-0.4.0 | spec/element/prepend_spec.rb |