summaryrefslogtreecommitdiff
path: root/spec/ruby/library/pathname
diff options
context:
space:
mode:
Diffstat (limited to 'spec/ruby/library/pathname')
-rw-r--r--spec/ruby/library/pathname/case_compare_spec.rb8
-rw-r--r--spec/ruby/library/pathname/divide_spec.rb6
-rw-r--r--spec/ruby/library/pathname/plus_spec.rb7
-rw-r--r--spec/ruby/library/pathname/shared/plus.rb8
4 files changed, 17 insertions, 12 deletions
diff --git a/spec/ruby/library/pathname/case_compare_spec.rb b/spec/ruby/library/pathname/case_compare_spec.rb
new file mode 100644
index 0000000000..0cf799dd23
--- /dev/null
+++ b/spec/ruby/library/pathname/case_compare_spec.rb
@@ -0,0 +1,8 @@
+require_relative '../../spec_helper'
+require 'pathname'
+
+describe "Pathname#===" do
+ it "is an alias of Pathname#==" do
+ Pathname.instance_method(:===).should == Pathname.instance_method(:==)
+ end
+end
diff --git a/spec/ruby/library/pathname/divide_spec.rb b/spec/ruby/library/pathname/divide_spec.rb
index 8af79d0c8f..e5afc9f864 100644
--- a/spec/ruby/library/pathname/divide_spec.rb
+++ b/spec/ruby/library/pathname/divide_spec.rb
@@ -1,6 +1,8 @@
require_relative '../../spec_helper'
-require_relative 'shared/plus'
+require 'pathname'
describe "Pathname#/" do
- it_behaves_like :pathname_plus, :/
+ it "is an alias of Pathname#+" do
+ Pathname.instance_method(:/).should == Pathname.instance_method(:+)
+ end
end
diff --git a/spec/ruby/library/pathname/plus_spec.rb b/spec/ruby/library/pathname/plus_spec.rb
index 57e472c266..76316df9d2 100644
--- a/spec/ruby/library/pathname/plus_spec.rb
+++ b/spec/ruby/library/pathname/plus_spec.rb
@@ -1,6 +1,9 @@
require_relative '../../spec_helper'
-require_relative 'shared/plus'
+require 'pathname'
describe "Pathname#+" do
- it_behaves_like :pathname_plus, :+
+ it "appends a pathname to self" do
+ p = Pathname.new("/usr")
+ (p + "bin/ruby").should == Pathname.new("/usr/bin/ruby")
+ end
end
diff --git a/spec/ruby/library/pathname/shared/plus.rb b/spec/ruby/library/pathname/shared/plus.rb
deleted file mode 100644
index b3b896ea43..0000000000
--- a/spec/ruby/library/pathname/shared/plus.rb
+++ /dev/null
@@ -1,8 +0,0 @@
-require 'pathname'
-
-describe :pathname_plus, shared: true do
- it "appends a pathname to self" do
- p = Pathname.new("/usr")
- p.send(@method, "bin/ruby").should == Pathname.new("/usr/bin/ruby")
- end
-end