Permalink
Browse files

Add a spec that Range#hash should always return a Fixnum value

  • Loading branch information...
1 parent 8edd14e commit e8cababcf7f5cba83a209c5a5c8636c20fe2769e @dbussink dbussink committed with brixen Oct 5, 2011
Showing with 8 additions and 0 deletions.
  1. +8 −0 core/range/hash_spec.rb
View
@@ -13,4 +13,12 @@
(0...10).hash.should == (0...10).hash
(0..10).hash.should_not == (0...10).hash
end
+
+ it "generates a Fixnum for the hash value" do
+ (0..0).hash.should be_an_instance_of(Fixnum)
+ (0..1).hash.should be_an_instance_of(Fixnum)
+ (0...10).hash.should be_an_instance_of(Fixnum)
+ (0..10).hash.should be_an_instance_of(Fixnum)
+ end
+
end

0 comments on commit e8cabab

Please sign in to comment.