summaryrefslogtreecommitdiff
path: root/spec/ruby/library/pathname/hash_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/ruby/library/pathname/hash_spec.rb')
-rw-r--r--spec/ruby/library/pathname/hash_spec.rb15
1 files changed, 15 insertions, 0 deletions
diff --git a/spec/ruby/library/pathname/hash_spec.rb b/spec/ruby/library/pathname/hash_spec.rb
new file mode 100644
index 0000000000..f3201e2f4f
--- /dev/null
+++ b/spec/ruby/library/pathname/hash_spec.rb
@@ -0,0 +1,15 @@
+require File.expand_path('../../../spec_helper', __FILE__)
+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
+