summaryrefslogtreecommitdiff
path: root/spec/rubyspec/core/string/hash_spec.rb
blob: 255168cebdf152ccf1ae2731b2d73f3a01f9e61c (plain)
1
2
3
4
5
6
7
8
9
require File.expand_path('../../../spec_helper', __FILE__)
require File.expand_path('../fixtures/classes.rb', __FILE__)

describe "String#hash" do
  it "returns a hash based on a string's length and content" do
    "abc".hash.should == "abc".hash
    "abc".hash.should_not == "cba".hash
  end
end