diff options
author | Benoit Daloze <eregontp@gmail.com> | 2019-09-29 19:13:37 +0200 |
---|---|---|
committer | Benoit Daloze <eregontp@gmail.com> | 2019-09-29 19:13:37 +0200 |
commit | 070cbe22b70ec2bec36c7cfc84b726510afa306f (patch) | |
tree | 56cee87834c85bd9f358ebee51bab4893fb9952f /spec/ruby/core/dir/shared | |
parent | d51b4e34fbdbe1a845aa2251b1fa3304de809b32 (diff) | |
download | ruby-070cbe22b70ec2bec36c7cfc84b726510afa306f.tar.gz |
Update to ruby/spec@34e6246
Diffstat (limited to 'spec/ruby/core/dir/shared')
-rw-r--r-- | spec/ruby/core/dir/shared/chroot.rb | 6 | ||||
-rw-r--r-- | spec/ruby/core/dir/shared/exist.rb | 2 | ||||
-rw-r--r-- | spec/ruby/core/dir/shared/glob.rb | 4 |
3 files changed, 6 insertions, 6 deletions
diff --git a/spec/ruby/core/dir/shared/chroot.rb b/spec/ruby/core/dir/shared/chroot.rb index 93699f93be..b14a433670 100644 --- a/spec/ruby/core/dir/shared/chroot.rb +++ b/spec/ruby/core/dir/shared/chroot.rb @@ -16,7 +16,7 @@ describe :dir_chroot_as_root, shared: true do it "can be used to change the process' root directory" do -> { Dir.send(@method, File.dirname(__FILE__)) }.should_not raise_error - File.exist?("/#{File.basename(__FILE__)}").should be_true + File.should.exist?("/#{File.basename(__FILE__)}") end it "returns 0 if successful" do @@ -29,8 +29,8 @@ describe :dir_chroot_as_root, shared: true do it "can be escaped from with ../" do Dir.send(@method, @real_root) - File.exist?(@ref_dir).should be_true - File.exist?("/#{File.basename(__FILE__)}").should be_false + File.should.exist?(@ref_dir) + File.should_not.exist?("/#{File.basename(__FILE__)}") end it "calls #to_path on non-String argument" do diff --git a/spec/ruby/core/dir/shared/exist.rb b/spec/ruby/core/dir/shared/exist.rb index fbd2c9862d..765d1b656c 100644 --- a/spec/ruby/core/dir/shared/exist.rb +++ b/spec/ruby/core/dir/shared/exist.rb @@ -39,7 +39,7 @@ describe :dir_exist, shared: true do end it "returns false if the argument exists but is a file" do - File.exist?(__FILE__).should be_true + File.should.exist?(__FILE__) Dir.send(@method, __FILE__).should be_false end diff --git a/spec/ruby/core/dir/shared/glob.rb b/spec/ruby/core/dir/shared/glob.rb index 62675145df..b47e23b41c 100644 --- a/spec/ruby/core/dir/shared/glob.rb +++ b/spec/ruby/core/dir/shared/glob.rb @@ -331,14 +331,14 @@ describe :dir_glob, shared: true do it "returns [] if specified path does not exist" do path = File.join(@mock_dir, "fake-name") - File.exist?(path).should == false + File.should_not.exist?(path) Dir.send(@method, "*", base: path).should == [] end it "returns [] if specified path is a file" do path = File.join(@mock_dir, "a/b/x") - File.exist?(path).should == true + File.should.exist?(path) Dir.send(@method, "*", base: path).should == [] end |