summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavide Cavalca <dcavalca@fb.com>2016-03-07 10:05:16 -0800
committerDavide Cavalca <dcavalca@fb.com>2016-03-07 10:05:16 -0800
commit7f8af07e287282aefdb55bea57f50c05318787f2 (patch)
treeaf599930adc1dd5e2e078c2ced6c424ae05837d8
parent656386a80ceaa0f39302761764892d11cb804587 (diff)
downloadchef-7f8af07e287282aefdb55bea57f50c05318787f2.tar.gz
rubocop fixes
-rw-r--r--spec/unit/provider/service/systemd_service_spec.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/spec/unit/provider/service/systemd_service_spec.rb b/spec/unit/provider/service/systemd_service_spec.rb
index 06614442fe..e0a94127b7 100644
--- a/spec/unit/provider/service/systemd_service_spec.rb
+++ b/spec/unit/provider/service/systemd_service_spec.rb
@@ -26,8 +26,8 @@ describe Chef::Provider::Service::Systemd do
node.default["etc"] = Hash.new
node.default["etc"]["passwd"] = {
"joe" => {
- "uid" => 10000
- }
+ "uid" => 10000,
+ },
}
node
}
@@ -196,14 +196,14 @@ describe Chef::Provider::Service::Systemd do
context "when a user is specified" do
it "should call '#{systemctl_path} --user start service_name' if no start command is specified" do
current_resource.user("joe")
- expect(provider).to receive(:shell_out_with_systems_locale!).with("#{systemctl_path} --user start #{service_name}", {"environment"=>{"DBUS_SESSION_BUS_ADDRESS"=>"unix:path=/run/user/10000/bus"}, "user" => "joe"}).and_return(shell_out_success)
+ expect(provider).to receive(:shell_out_with_systems_locale!).with("#{systemctl_path} --user start #{service_name}", { "environment" => { "DBUS_SESSION_BUS_ADDRESS" => "unix:path=/run/user/10000/bus" }, "user" => "joe" }).and_return(shell_out_success)
provider.start_service
end
it "should not call '#{systemctl_path} --user start service_name' if it is already running" do
current_resource.running(true)
current_resource.user("joe")
- expect(provider).not_to receive(:shell_out_with_systems_locale!).with("#{systemctl_path} --user start #{service_name}", {"environment"=>{"DBUS_SESSION_BUS_ADDRESS"=>"unix:path=/run/user/10000/bus"}, "user" => "joe"})
+ expect(provider).not_to receive(:shell_out_with_systems_locale!).with("#{systemctl_path} --user start #{service_name}", { "environment" => { "DBUS_SESSION_BUS_ADDRESS" => "unix:path=/run/user/10000/bus" }, "user" => "joe" })
provider.start_service
end
end