summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPete Higgins <pete@peterhiggins.org>2020-07-24 16:36:26 -0700
committerPete Higgins <pete@peterhiggins.org>2020-07-24 16:36:26 -0700
commite2777777bbf42fd9f8c69d365d95b5b35dbe361f (patch)
treea0a856286e0eef35207973e4ed620c18e9d24c87
parent7aaf23d9a2b4dd679050c99ea19543bbf986bf49 (diff)
downloadchef-e2777777bbf42fd9f8c69d365d95b5b35dbe361f.tar.gz
Use built in constant.remove-some-test-cruft
Signed-off-by: Pete Higgins <pete@peterhiggins.org>
-rw-r--r--spec/support/chef_helpers.rb2
-rw-r--r--spec/support/platform_helpers.rb2
2 files changed, 1 insertions, 3 deletions
diff --git a/spec/support/chef_helpers.rb b/spec/support/chef_helpers.rb
index 05a0fea787..810ebe56d7 100644
--- a/spec/support/chef_helpers.rb
+++ b/spec/support/chef_helpers.rb
@@ -44,7 +44,7 @@ end
# win32/service gem. windows_service_manager tests create a windows
# service that starts with the system ruby and requires this gem.
def system_windows_service_gem?
- windows_service_gem_check_command = %{ruby -r "win32/daemon" -e ":noop" > #{DEV_NULL} 2>&1}
+ windows_service_gem_check_command = %{ruby -r "win32/daemon" -e ":noop" > #{File::NULL} 2>&1}
if defined?(Bundler)
Bundler.with_unbundled_env do
# This returns true if the gem can be loaded
diff --git a/spec/support/platform_helpers.rb b/spec/support/platform_helpers.rb
index 709e137f24..7e17b75206 100644
--- a/spec/support/platform_helpers.rb
+++ b/spec/support/platform_helpers.rb
@@ -193,8 +193,6 @@ def supports_cloexec?
Fcntl.const_defined?("F_SETFD") && Fcntl.const_defined?("FD_CLOEXEC")
end
-DEV_NULL = windows? ? "NUL" : "/dev/null"
-
def selinux_enabled?
# This code is currently copied from lib/chef/util/selinux to make
# specs independent of product.