summaryrefslogtreecommitdiff
path: root/spec/ruby/core/file/shared
diff options
context:
space:
mode:
authorBenoit Daloze <eregontp@gmail.com>2019-09-29 19:13:37 +0200
committerBenoit Daloze <eregontp@gmail.com>2019-09-29 19:13:37 +0200
commit070cbe22b70ec2bec36c7cfc84b726510afa306f (patch)
tree56cee87834c85bd9f358ebee51bab4893fb9952f /spec/ruby/core/file/shared
parentd51b4e34fbdbe1a845aa2251b1fa3304de809b32 (diff)
Update to ruby/spec@34e6246
Diffstat (limited to 'spec/ruby/core/file/shared')
-rw-r--r--spec/ruby/core/file/shared/path.rb3
-rw-r--r--spec/ruby/core/file/shared/unlink.rb10
2 files changed, 6 insertions, 7 deletions
diff --git a/spec/ruby/core/file/shared/path.rb b/spec/ruby/core/file/shared/path.rb
index 9df3416c89..cfd119f799 100644
--- a/spec/ruby/core/file/shared/path.rb
+++ b/spec/ruby/core/file/shared/path.rb
@@ -68,8 +68,7 @@ describe :file_path, shared: true do
-> { f.send(@method) }.should raise_error(IOError)
end
rescue Errno::EOPNOTSUPP, Errno::EINVAL, Errno::EISDIR
- # EOPNOTSUPP: no support from the filesystem
- 1.should == 1
+ skip "no support from the filesystem"
end
end
end
diff --git a/spec/ruby/core/file/shared/unlink.rb b/spec/ruby/core/file/shared/unlink.rb
index d72ab4701f..e339e93271 100644
--- a/spec/ruby/core/file/shared/unlink.rb
+++ b/spec/ruby/core/file/shared/unlink.rb
@@ -21,13 +21,13 @@ describe :file_unlink, shared: true do
it "deletes a single file" do
File.send(@method, @file1).should == 1
- File.exist?(@file1).should == false
+ File.should_not.exist?(@file1)
end
it "deletes multiple files" do
File.send(@method, @file1, @file2).should == 2
- File.exist?(@file1).should == false
- File.exist?(@file2).should == false
+ File.should_not.exist?(@file1)
+ File.should_not.exist?(@file2)
end
it "raises a TypeError if not passed a String type" do
@@ -52,10 +52,10 @@ describe :file_unlink, shared: true do
it "allows deleting an open file with File::SHARE_DELETE" do
path = tmp("share_delete.txt")
File.open(path, mode: File::CREAT | File::WRONLY | File::BINARY | File::SHARE_DELETE) do |f|
- File.exist?(path).should be_true
+ File.should.exist?(path)
File.send(@method, path)
end
- File.exist?(path).should be_false
+ File.should_not.exist?(path)
end
end
end