diff options
author | Tim Smith <tsmith84@gmail.com> | 2020-08-11 13:30:10 -0700 |
---|---|---|
committer | Tim Smith <tsmith84@gmail.com> | 2020-08-12 14:02:34 -0700 |
commit | 4848c89b7cc5e4a4d4fac7c8bff962f7df69f719 (patch) | |
tree | cf1bc6d0b30f226573da88158049f1334b6ce1bd /spec/support/shared/functional | |
parent | 798cac61accc035b51aaac25160bf1d5e9715252 (diff) | |
download | chef-exist.tar.gz |
File.exists? -> File.exist?exist
Update some of these methods
Signed-off-by: Tim Smith <tsmith@chef.io>
Diffstat (limited to 'spec/support/shared/functional')
5 files changed, 8 insertions, 8 deletions
diff --git a/spec/support/shared/functional/directory_resource.rb b/spec/support/shared/functional/directory_resource.rb index 62055ca07d..cd05280aa8 100644 --- a/spec/support/shared/functional/directory_resource.rb +++ b/spec/support/shared/functional/directory_resource.rb @@ -173,6 +173,6 @@ shared_context Chef::Resource::Directory do end after(:each) do - FileUtils.rm_r(path) if File.exists?(path) + FileUtils.rm_r(path) if File.exist?(path) end end diff --git a/spec/support/shared/functional/execute_resource.rb b/spec/support/shared/functional/execute_resource.rb index 5e0c9e4e28..9d1c29dfac 100644 --- a/spec/support/shared/functional/execute_resource.rb +++ b/spec/support/shared/functional/execute_resource.rb @@ -62,7 +62,7 @@ shared_context "a command that can be executed as an alternate user" do end after do - File.delete(script_output_path) if File.exists?(script_output_path) + File.delete(script_output_path) if File.exist?(script_output_path) Dir.rmdir(script_output_dir) if Dir.exist?(script_output_dir) end end diff --git a/spec/support/shared/functional/file_resource.rb b/spec/support/shared/functional/file_resource.rb index 77e823a682..1385d3dc30 100644 --- a/spec/support/shared/functional/file_resource.rb +++ b/spec/support/shared/functional/file_resource.rb @@ -1037,8 +1037,8 @@ shared_context Chef::Resource::File do end after(:each) do - FileUtils.rm_r(path) if File.exists?(path) - FileUtils.rm_r(CHEF_SPEC_BACKUP_PATH) if File.exists?(CHEF_SPEC_BACKUP_PATH) + FileUtils.rm_r(path) if File.exist?(path) + FileUtils.rm_r(CHEF_SPEC_BACKUP_PATH) if File.exist?(CHEF_SPEC_BACKUP_PATH) end after do diff --git a/spec/support/shared/functional/win32_service.rb b/spec/support/shared/functional/win32_service.rb index 2d14c6cf86..dfd66f74ad 100644 --- a/spec/support/shared/functional/win32_service.rb +++ b/spec/support/shared/functional/win32_service.rb @@ -30,7 +30,7 @@ shared_context "using Win32::Service" do end # Delete the test_service_file if it exists - if File.exists?(test_service_file) + if File.exist?(test_service_file) File.delete(test_service_file) end end diff --git a/spec/support/shared/functional/windows_script.rb b/spec/support/shared/functional/windows_script.rb index 3ccb7b6e37..151ad2387c 100644 --- a/spec/support/shared/functional/windows_script.rb +++ b/spec/support/shared/functional/windows_script.rb @@ -39,11 +39,11 @@ shared_context Chef::Resource::WindowsScript do end before(:each) do - File.delete(script_output_path) if File.exists?(script_output_path) + File.delete(script_output_path) if File.exist?(script_output_path) end after(:each) do - File.delete(script_output_path) if File.exists?(script_output_path) + File.delete(script_output_path) if File.exist?(script_output_path) end shared_examples_for "a script resource with architecture attribute" do @@ -138,7 +138,7 @@ shared_context Chef::Resource::WindowsScript do after do script_file.close! if script_file - ::File.delete(script_file.to_path) if script_file && ::File.exists?(script_file.to_path) + ::File.delete(script_file.to_path) if script_file && ::File.exist?(script_file.to_path) end include_context "alternate user identity" |