spec/dom/document_spec.rb in opal-browser-0.2.0.beta1 vs spec/dom/document_spec.rb in opal-browser-0.2.0

- old
+ new

@@ -35,6 +35,26 @@ it "should return nil if it can't find anything" do expect($document["doo-dah"]).to be_nil end end + + describe "#ready" do + async "calls the block when the document is ready" do + $document.ready do + async { + expect(true).to be_truthy + } + end + end + end + + describe "#ready?" do + async "is true inside a #ready block" do + $document.ready do + async { + expect($document.ready?).to be_truthy + } + end + end + end end