summaryrefslogtreecommitdiff
path: root/spec/functional/resource/insserv_spec.rb
diff options
context:
space:
mode:
authorTim Smith <tsmith@chef.io>2020-08-14 10:15:40 -0700
committerGitHub <noreply@github.com>2020-08-14 10:15:40 -0700
commitc0c8c32e41a4496d3b78acc942f26f667045b3f8 (patch)
treee1ba9028cb89f0fc83fcbecb5ed778ac4ad6f630 /spec/functional/resource/insserv_spec.rb
parentb9df6856a1eb4688f013ba0449a362f951ab40e5 (diff)
parent4848c89b7cc5e4a4d4fac7c8bff962f7df69f719 (diff)
downloadchef-c0c8c32e41a4496d3b78acc942f26f667045b3f8.tar.gz
Merge pull request #10284 from chef/exist
Fix File.exist throughout the codebase
Diffstat (limited to 'spec/functional/resource/insserv_spec.rb')
-rw-r--r--spec/functional/resource/insserv_spec.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/spec/functional/resource/insserv_spec.rb b/spec/functional/resource/insserv_spec.rb
index bd3b98a1e2..92275fffba 100644
--- a/spec/functional/resource/insserv_spec.rb
+++ b/spec/functional/resource/insserv_spec.rb
@@ -38,11 +38,11 @@ describe Chef::Resource::Service, :requires_root, :opensuse do
# Platform specific validation routines.
def service_should_be_started(file_name)
# The existence of this file indicates that the service was started.
- expect(File.exists?("#{Dir.tmpdir}/#{file_name}")).to be_truthy
+ expect(File.exist?("#{Dir.tmpdir}/#{file_name}")).to be_truthy
end
def service_should_be_stopped(file_name)
- expect(File.exists?("#{Dir.tmpdir}/#{file_name}")).to be_falsey
+ expect(File.exist?("#{Dir.tmpdir}/#{file_name}")).to be_falsey
end
def delete_test_files
@@ -73,13 +73,13 @@ describe Chef::Resource::Service, :requires_root, :opensuse do
end
before(:all) do
- File.delete("/etc/init.d/inittest") if File.exists?("/etc/init.d/inittest")
+ File.delete("/etc/init.d/inittest") if File.exist?("/etc/init.d/inittest")
FileUtils.cp((File.join(File.dirname(__FILE__), "/../assets/inittest")).to_s, "/etc/init.d/inittest")
FileUtils.chmod(0755, "/etc/init.d/inittest")
end
after(:all) do
- File.delete("/etc/init.d/inittest") if File.exists?("/etc/init.d/inittest")
+ File.delete("/etc/init.d/inittest") if File.exist?("/etc/init.d/inittest")
end
before(:each) do