Sha256: 07b64aa8b1fcea74b22b1f50b816a94683ad9423c36afbed9bdc616917a8f22c

Contents?: true

Size: 525 Bytes

Versions: 16

Compression:

Stored size: 525 Bytes

Contents

require "spec_helper"

describe "Element#append_to" do
  html <<-HTML
    <div id="foo"></div>
    <div id="bar"></div>
    <div id="baz"></div>
  HTML

  it "should insert the receiver into the target element" do
    Element.find('#foo').children.size.should == 0

    Element.parse('<ul class="kapow"></ul>').append_to Element.find('#foo')
    Element.find('#foo').children.class_name.should == "kapow"

    Element.find('#bar').append_to Element.find('#baz')
    Element.find('#baz').children.id.should == "bar"
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
opal-jquery-0.4.2 spec/element/append_to_spec.rb
opal-jquery-0.4.1 spec/element/append_to_spec.rb
opal-jquery-0.4.0 spec/element/append_to_spec.rb
opal-jquery-0.3.0 spec/element/append_to_spec.rb
opal-jquery-0.3.0.beta2 spec/element/append_to_spec.rb
opal-jquery-0.3.0.beta1 spec/element/append_to_spec.rb
opal-jquery-0.2.0 spec/element/append_to_spec.rb
opal-jquery-0.1.2 spec/element/append_to_spec.rb
opal-jquery-0.1.1 spec/element/append_to_spec.rb
opal-jquery-0.1.0 spec/element/append_to_spec.rb
opal-jquery-0.0.13 spec/element/append_to_spec.rb
opal-jquery-0.0.12 spec/element/append_to_spec.rb
opal-jquery-0.0.11 spec/element/append_to_spec.rb
opal-jquery-0.0.9 spec/element/append_to_spec.rb
opal-jquery-0.0.8 spec/element/append_to_spec.rb
opal-jquery-0.0.7 spec/element/append_to_spec.rb