summaryrefslogtreecommitdiff
path: root/spec/support/platform_helpers.rb
diff options
context:
space:
mode:
authorTim Smith <tsmith84@gmail.com>2020-08-11 13:30:10 -0700
committerTim Smith <tsmith84@gmail.com>2020-08-12 14:02:34 -0700
commit4848c89b7cc5e4a4d4fac7c8bff962f7df69f719 (patch)
treecf1bc6d0b30f226573da88158049f1334b6ce1bd /spec/support/platform_helpers.rb
parent798cac61accc035b51aaac25160bf1d5e9715252 (diff)
downloadchef-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/platform_helpers.rb')
-rw-r--r--spec/support/platform_helpers.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/spec/support/platform_helpers.rb b/spec/support/platform_helpers.rb
index 7e17b75206..38c778294f 100644
--- a/spec/support/platform_helpers.rb
+++ b/spec/support/platform_helpers.rb
@@ -105,7 +105,7 @@ def mac_osx_1014?
end
def mac_osx?
- if File.exists? "/usr/bin/sw_vers"
+ if File.exist? "/usr/bin/sw_vers"
result = ShellHelpers.shell_out("/usr/bin/sw_vers")
result.stdout.each_line do |line|
if /^ProductName:\sMac OS X.*$/.match?(line)
@@ -216,8 +216,8 @@ def selinux_enabled?
end
def suse?
- ::File.exists?("/etc/SuSE-release") ||
- ( ::File.exists?("/etc/os-release") && /sles|suse/.match?(File.read("/etc/os-release")) )
+ ::File.exist?("/etc/SuSE-release") ||
+ ( ::File.exist?("/etc/os-release") && /sles|suse/.match?(File.read("/etc/os-release")) )
end
def root?