spec/element_spec.rb in opal-jquery-0.4.1 vs spec/element_spec.rb in opal-jquery-0.4.2

- old
+ new

@@ -163,9 +163,21 @@ baz.should be_kind_of(Element) baz.length.should == 0 end end + describe ".not" do + it "should subtract from a set of elements" do + divs = Element['#foo, .woosh'] + divs.should be_kind_of(Element) + divs.size.should == 3 + + subtracted = divs.not('#foo') + subtracted.should be_kind_of(Element) + subtracted.length.should == 2 + end + end + describe '.id' do it "should return a new instance with the element with given id" do Element.id('foo').should be_kind_of(Element) Element.id('foo').id.should == 'foo' end