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 | |
parent | d51b4e34fbdbe1a845aa2251b1fa3304de809b32 (diff) | |
download | ruby-070cbe22b70ec2bec36c7cfc84b726510afa306f.tar.gz |
Update to ruby/spec@34e6246
Diffstat (limited to 'spec/ruby/core/dir')
-rw-r--r-- | spec/ruby/core/dir/chdir_spec.rb | 4 | ||||
-rw-r--r-- | spec/ruby/core/dir/mkdir_spec.rb | 4 | ||||
-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 |
5 files changed, 10 insertions, 10 deletions
diff --git a/spec/ruby/core/dir/chdir_spec.rb b/spec/ruby/core/dir/chdir_spec.rb index e9b8274382..729ac403e3 100644 --- a/spec/ruby/core/dir/chdir_spec.rb +++ b/spec/ruby/core/dir/chdir_spec.rb @@ -95,8 +95,8 @@ describe "Dir.chdir" do it "raises an Errno::ENOENT if the original directory no longer exists" do dir1 = tmp('/testdir1') dir2 = tmp('/testdir2') - File.exist?(dir1).should == false - File.exist?(dir2).should == false + File.should_not.exist?(dir1) + File.should_not.exist?(dir2) Dir.mkdir dir1 Dir.mkdir dir2 begin diff --git a/spec/ruby/core/dir/mkdir_spec.rb b/spec/ruby/core/dir/mkdir_spec.rb index 58767a5aa0..c6e2f164e2 100644 --- a/spec/ruby/core/dir/mkdir_spec.rb +++ b/spec/ruby/core/dir/mkdir_spec.rb @@ -14,9 +14,9 @@ describe "Dir.mkdir" do DirSpecs.clear_dirs begin - File.exist?('nonexisting').should == false + File.should_not.exist?('nonexisting') Dir.mkdir 'nonexisting' - File.exist?('nonexisting').should == true + File.should.exist?('nonexisting') platform_is_not :windows do Dir.mkdir 'default_perms' a = File.stat('default_perms').mode 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 |