spec/element/after_spec.rb in opal-jquery-0.0.6 vs spec/element/after_spec.rb in opal-jquery-0.0.7
- old
+ new
@@ -7,19 +7,19 @@
<div id="bar" class="after-spec-first"></div>
<div id="baz"></div>
HTML
it "should insert the given html string after each element" do
- el = Document['.after-spec-first']
+ el = Element.find('.after-spec-first')
el.size.should == 2
el.after '<p class="woosh"></p>'
- Document.id('foo').next.class_name.should == "woosh"
- Document.id('bar').next.class_name.should == "woosh"
+ Element.find('#foo').next.class_name.should == "woosh"
+ Element.find('#bar').next.class_name.should == "woosh"
end
it "should insert the given DOM element after this element" do
- Document.id('baz').after Document.id('some-header')
- Document.id('baz').next.id.should == "some-header"
+ Element.find('#baz').after Element.find('#some-header')
+ Element.find('#baz').next.id.should == "some-header"
end
end