spec/spec.google_hash.rb in google_hash-0.8.5 vs spec/spec.google_hash.rb in google_hash-0.8.6
- old
+ new
@@ -50,10 +50,11 @@
it "should have all the methods desired" do
# guess these could all be tests, themselves...
@subject.each{|k, v| raise}
@subject[33] = 34
@subject.length.should == 1
+ @subject.size.should == 1
sum = 0
@subject.each{|k, v| sum += k; sum += v}
sum.should == (33+34)
@subject[33] = 'abc'
@subject.each{|k, v|
@@ -61,9 +62,10 @@
v.should == 'abc'
}
@subject.clear
@subject.length.should == 0
+ @subject.size.should == 0
@subject.keys.should == []
@subject[33] = 'abc'
@subject.delete(33).should == 'abc' # we don't actually have these methods yet :)
@subject.length.should == 0
@subject[33] = 'def'