Use .exists? instead of .exist?

This commit is contained in:
Brandon Robins
2018-01-31 22:19:38 -06:00
parent 714901023e
commit f6f5590062
2 changed files with 4 additions and 4 deletions

View File

@@ -7,10 +7,10 @@ require 'support/examples/ext_mkcol'
RSpec.describe 'mkcol', type: :request do RSpec.describe 'mkcol', type: :request do
before(:all) do before(:all) do
tmp_dir = Rails.root.join('../../tmp').to_path tmp_dir = Rails.root.join('../../tmp').to_path
Dir.mkdir tmp_dir unless File.exists? tmp_dir Dir.mkdir tmp_dir unless File.exist? tmp_dir
webdav_dir = Rails.root.join('../../tmp/webdav').to_path webdav_dir = Rails.root.join('../../tmp/webdav').to_path
FileUtils.rm_r webdav_dir if File.exists? webdav_dir FileUtils.rm_r webdav_dir if File.exist? webdav_dir
Dir.mkdir webdav_dir Dir.mkdir webdav_dir
end end

View File

@@ -8,10 +8,10 @@ require 'support/examples/proppatch'
RSpec.describe 'PROPFIND', type: :request do RSpec.describe 'PROPFIND', type: :request do
before(:all) do before(:all) do
tmp_dir = Rails.root.join('../../tmp').to_path tmp_dir = Rails.root.join('../../tmp').to_path
Dir.mkdir tmp_dir unless File.exists? tmp_dir Dir.mkdir tmp_dir unless File.exist? tmp_dir
webdav_dir = Rails.root.join('../../tmp/webdav').to_path webdav_dir = Rails.root.join('../../tmp/webdav').to_path
FileUtils.rm_r webdav_dir if File.exists? webdav_dir FileUtils.rm_r webdav_dir if File.exist? webdav_dir
Dir.mkdir webdav_dir Dir.mkdir webdav_dir
end end