Sha256: 951e80fabe9e388f3be880272abb1e07f9a597d9f81f7cc5831b2c11aca2e890

Contents?: true

Size: 552 Bytes

Versions: 3

Compression:

Stored size: 552 Bytes

Contents

describe "Element#remove" do
  
  before(:all) do
    elem = Element.new :div, :id => "element_remove_spec"
  
    elem.html = [
      "<div id='remove_spec_1'></div>",
      "<div id='remove_spec_2'></div>"
    ].join("")
    
    Document.body << elem
  end
  
  it "should remove the receiver from its parent, but not delete it" do
    e = Document[:element_remove_spec]
    Document[:remove_spec_1].remove
    Document[:remove_spec_2].remove
    e.empty?.should == true
  end
  
  after :all do
    Document[:element_remove_spec].remove
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
opal-0.2.2 opals/opal/browser/spec/element/remove_spec.rb
opal-0.2.0 opals/opal/browser/spec/element/remove_spec.rb
opal-0.1.0 opals/browser/spec/element/remove_spec.rb