aboutsummaryrefslogtreecommitdiffstats
path: root/spec/ruby/core/file
diff options
context:
space:
mode:
authoreregon <eregon@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2019-02-07 16:35:33 +0000
committereregon <eregon@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2019-02-07 16:35:33 +0000
commit75334db3c6479ea3cd7462d36ca5464d386f9c72 (patch)
treec97df2c7aa02f3d0e65524890924f1b294871073 /spec/ruby/core/file
parent5c7c6763f6cf7b4face107735071c5470e835476 (diff)
downloadruby-75334db3c6479ea3cd7462d36ca5464d386f9c72.tar.gz
Update to ruby/spec@6cf8ebe
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67030 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'spec/ruby/core/file')
-rw-r--r--spec/ruby/core/file/expand_path_spec.rb2
-rw-r--r--spec/ruby/core/file/new_spec.rb2
-rw-r--r--spec/ruby/core/file/open_spec.rb4
-rw-r--r--spec/ruby/core/file/shared/fnmatch.rb2
-rw-r--r--spec/ruby/core/file/stat/dev_major_spec.rb8
-rw-r--r--spec/ruby/core/file/stat/dev_minor_spec.rb8
-rw-r--r--spec/ruby/core/file/stat/rdev_major_spec.rb8
-rw-r--r--spec/ruby/core/file/stat/rdev_minor_spec.rb8
-rw-r--r--spec/ruby/core/file/sticky_spec.rb2
9 files changed, 26 insertions, 18 deletions
diff --git a/spec/ruby/core/file/expand_path_spec.rb b/spec/ruby/core/file/expand_path_spec.rb
index 9ecd730a7b..6e24e62075 100644
--- a/spec/ruby/core/file/expand_path_spec.rb
+++ b/spec/ruby/core/file/expand_path_spec.rb
@@ -71,7 +71,7 @@ describe "File.expand_path" do
File.expand_path("../bin", "x/../tmp").should == File.join(@base, 'bin')
end
- it "expand_path for commoms unix path give a full path" do
+ it "expand_path for common unix path gives a full path" do
File.expand_path('/tmp/').should =='/tmp'
File.expand_path('/tmp/../../../tmp').should == '/tmp'
File.expand_path('').should == Dir.pwd
diff --git a/spec/ruby/core/file/new_spec.rb b/spec/ruby/core/file/new_spec.rb
index 815ecd9d36..3bb2712ada 100644
--- a/spec/ruby/core/file/new_spec.rb
+++ b/spec/ruby/core/file/new_spec.rb
@@ -38,7 +38,7 @@ describe "File.new" do
end
it "creates the file and returns writable descriptor when called with 'w' mode and r-o permissions" do
- # it should be possible to write to such a file via returned descriptior,
+ # it should be possible to write to such a file via returned descriptor,
# even though the file permissions are r-r-r.
rm_r @file
diff --git a/spec/ruby/core/file/open_spec.rb b/spec/ruby/core/file/open_spec.rb
index c37e7316ba..931ff2d239 100644
--- a/spec/ruby/core/file/open_spec.rb
+++ b/spec/ruby/core/file/open_spec.rb
@@ -128,7 +128,7 @@ describe "File.open" do
end
it "creates the file and returns writable descriptor when called with 'w' mode and r-o permissions" do
- # it should be possible to write to such a file via returned descriptior,
+ # it should be possible to write to such a file via returned descriptor,
# even though the file permissions are r-r-r.
File.open(@file, "w", 0444) { |f| f.write("test") }
@@ -236,7 +236,7 @@ describe "File.open" do
File.exist?(@file).should == true
end
- # Check the grants associated to the differents open modes combinations.
+ # Check the grants associated to the different open modes combinations.
it "raises an ArgumentError exception when call with an unknown mode" do
lambda { File.open(@file, "q") }.should raise_error(ArgumentError)
end
diff --git a/spec/ruby/core/file/shared/fnmatch.rb b/spec/ruby/core/file/shared/fnmatch.rb
index 9b423ae47e..49a870e95a 100644
--- a/spec/ruby/core/file/shared/fnmatch.rb
+++ b/spec/ruby/core/file/shared/fnmatch.rb
@@ -87,7 +87,7 @@ describe :file_fnmatch, shared: true do
File.send(@method, '[a-z]', 'D', File::FNM_CASEFOLD).should == true
end
- it "does not match characters outside of the range of the bracket expresion" do
+ it "does not match characters outside of the range of the bracket expression" do
File.send(@method, 'ca[x-z]', 'cat').should == false
File.send(@method, '/ca[s][s-t]/rul[a-b]/[z]he/[x-Z]orld', '/cats/rule/the/World').should == false
end
diff --git a/spec/ruby/core/file/stat/dev_major_spec.rb b/spec/ruby/core/file/stat/dev_major_spec.rb
index 4966d609e2..845c883a42 100644
--- a/spec/ruby/core/file/stat/dev_major_spec.rb
+++ b/spec/ruby/core/file/stat/dev_major_spec.rb
@@ -9,9 +9,11 @@ describe "File::Stat#dev_major" do
rm_r @name
end
- platform_is_not :windows do
- it "returns the major part of File::Stat#dev" do
- File.stat(@name).dev_major.should be_kind_of(Integer)
+ ruby_version_is "2.4" do
+ platform_is_not :windows do
+ it "returns the major part of File::Stat#dev" do
+ File.stat(@name).dev_major.should be_kind_of(Integer)
+ end
end
end
diff --git a/spec/ruby/core/file/stat/dev_minor_spec.rb b/spec/ruby/core/file/stat/dev_minor_spec.rb
index ea79c12b99..ddfb6a7b6a 100644
--- a/spec/ruby/core/file/stat/dev_minor_spec.rb
+++ b/spec/ruby/core/file/stat/dev_minor_spec.rb
@@ -9,9 +9,11 @@ describe "File::Stat#dev_minor" do
rm_r @name
end
- platform_is_not :windows do
- it "returns the minor part of File::Stat#dev" do
- File.stat(@name).dev_minor.should be_kind_of(Integer)
+ ruby_version_is "2.4" do
+ platform_is_not :windows do
+ it "returns the minor part of File::Stat#dev" do
+ File.stat(@name).dev_minor.should be_kind_of(Integer)
+ end
end
end
diff --git a/spec/ruby/core/file/stat/rdev_major_spec.rb b/spec/ruby/core/file/stat/rdev_major_spec.rb
index f8a8d1b107..3d7f6ef759 100644
--- a/spec/ruby/core/file/stat/rdev_major_spec.rb
+++ b/spec/ruby/core/file/stat/rdev_major_spec.rb
@@ -17,9 +17,11 @@ describe "File::Stat#rdev_major" do
end
end
- platform_is_not :windows do
- it "returns the major part of File::Stat#rdev" do
- File.stat(@name).rdev_major.should be_kind_of(Integer)
+ ruby_version_is "2.4" do
+ platform_is_not :windows do
+ it "returns the major part of File::Stat#rdev" do
+ File.stat(@name).rdev_major.should be_kind_of(Integer)
+ end
end
end
diff --git a/spec/ruby/core/file/stat/rdev_minor_spec.rb b/spec/ruby/core/file/stat/rdev_minor_spec.rb
index dc30c1f56c..e25c61ca86 100644
--- a/spec/ruby/core/file/stat/rdev_minor_spec.rb
+++ b/spec/ruby/core/file/stat/rdev_minor_spec.rb
@@ -17,9 +17,11 @@ describe "File::Stat#rdev_minor" do
end
end
- platform_is_not :windows do
- it "returns the minor part of File::Stat#rdev" do
- File.stat(@name).rdev_minor.should be_kind_of(Integer)
+ ruby_version_is "2.4" do
+ platform_is_not :windows do
+ it "returns the minor part of File::Stat#rdev" do
+ File.stat(@name).rdev_minor.should be_kind_of(Integer)
+ end
end
end
diff --git a/spec/ruby/core/file/sticky_spec.rb b/spec/ruby/core/file/sticky_spec.rb
index 7805c39f79..5f7b2d93eb 100644
--- a/spec/ruby/core/file/sticky_spec.rb
+++ b/spec/ruby/core/file/sticky_spec.rb
@@ -35,7 +35,7 @@ describe "File.sticky?" do
end
platform_is :bsd do
- # FreeBSD and NetBSD can't set stiky bit to a normal file
+ # FreeBSD and NetBSD can't set sticky bit to a normal file
it "cannot set sticky bit to a normal file" do
filename = tmp("i_exist")
touch(filename)