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.rb14
1 files changed, 14 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..da1b8f4f76
--- /dev/null
+++ b/spec/ruby/library/pathname/hash_spec.rb
@@ -0,0 +1,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