summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNathan Williams <nath.e.will@gmail.com>2015-10-23 23:20:43 -0700
committerNathan Williams <nath.e.will@gmail.com>2015-10-23 23:20:43 -0700
commitacf5c365ca3e5c221af386a5ffa7bb1c84a50c31 (patch)
tree06ff230d7a4c35dbf602c41cb3947e1e1065f659
parentaaa127a084099c53e54e1ccd01f4ef54f99acf68 (diff)
downloadchef-acf5c365ca3e5c221af386a5ffa7bb1c84a50c31.tar.gz
fix specs
-rw-r--r--lib/chef/platform/service_helpers.rb4
-rw-r--r--spec/unit/provider_resolver_spec.rb2
2 files changed, 3 insertions, 3 deletions
diff --git a/lib/chef/platform/service_helpers.rb b/lib/chef/platform/service_helpers.rb
index 3ef6ee4ae3..b392152651 100644
--- a/lib/chef/platform/service_helpers.rb
+++ b/lib/chef/platform/service_helpers.rb
@@ -47,7 +47,7 @@ class Chef
end
if ::File.exist?(Chef.path_to("/sbin/initctl"))
- service_resource_providers << :upstart
+ providers << :upstart
end
if ::File.exist?(Chef.path_to("/sbin/insserv"))
@@ -99,7 +99,7 @@ class Chef
def systemd_is_init?
::File.exist?(Chef.path_to("/proc/1/comm")) &&
- IO.read("/proc/1/comm").chomp == "systemd"
+ ::File.open(Chef.path_to("/proc/1/comm")).gets.chomp == "systemd"
end
def has_systemd_service_unit?(svc_name)
diff --git a/spec/unit/provider_resolver_spec.rb b/spec/unit/provider_resolver_spec.rb
index 773e29a6d7..c1256180af 100644
--- a/spec/unit/provider_resolver_spec.rb
+++ b/spec/unit/provider_resolver_spec.rb
@@ -179,7 +179,7 @@ describe Chef::ProviderResolver do
file "usr/local/etc/rc.d/#{service_name}", ""
when :systemd
file 'proc/1/comm', "systemd\n"
- file "/etc/systemd/system/#{service_name}.service", ""
+ file "etc/systemd/system/#{service_name}.service", ""
else
raise ArgumentError, config
end