summaryrefslogtreecommitdiff
path: root/spec/ruby/library/pathname/hash_spec.rb
blob: da1b8f4f76743ebab48452ab0e7b8e18eae87ce2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
require_relative '../../spec_helper'
require 'pathname'

describe "Pathname#hash" do

  it "is equal to the hash of the pathname" do
    Pathname.new('/usr/local/bin/').hash.should == '/usr/local/bin/'.hash
  end

  it "is not equal the hash of a different pathname" do
    Pathname.new('/usr/local/bin/').hash.should_not == '/usr/bin/'.hash
  end

end