spec/element/append_to_spec.rb in opal-jquery-0.0.1 vs spec/element/append_to_spec.rb in opal-jquery-0.0.2
- old
+ new
@@ -1,25 +1,19 @@
+require "spec_helper"
+
describe "Element#append_to" do
- before do
- @div = Document.parse <<-HTML
- <div id="foo"></div>
- <div id="bar"></div>
- <div id="baz"></div>
- HTML
+ html <<-HTML
+ <div id="foo"></div>
+ <div id="bar"></div>
+ <div id="baz"></div>
+ HTML
- @div.append_to_body
- end
-
- after do
- @div.remove
- end
-
it "should insert the receiver into the target element" do
Document.id('foo').children.size.should == 0
Document.parse('<ul class="kapow"></ul>').append_to Document.id('foo')
Document.id('foo').children.class_name.should == "kapow"
Document.id('bar').append_to Document.id('baz')
Document.id('baz').children.id.should == "bar"
end
-end
\ No newline at end of file
+end