From 44e1947f31fbe0e86e30d5ffd586f3fd51ee9b89 Mon Sep 17 00:00:00 2001 From: Karl Southern Date: Thu, 15 Sep 2016 20:43:48 +0100 Subject: [PATCH] Duh. --- spec/jdbc_spec_helper.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spec/jdbc_spec_helper.rb b/spec/jdbc_spec_helper.rb index 89bf44f..9df9914 100644 --- a/spec/jdbc_spec_helper.rb +++ b/spec/jdbc_spec_helper.rb @@ -124,7 +124,7 @@ RSpec.shared_context 'when outputting messages' do # Check that everything is fine right now expect { p.multi_receive([event]) }.not_to raise_error - cmd = 'sudo /etc/init.d/%s* %s' + start_stop_cmd = 'sudo /etc/init.d/%s* %s' `which systemctl` if $?.success? @@ -135,7 +135,7 @@ RSpec.shared_context 'when outputting messages' do `#{cmd}` # Start a thread to restart the service after the fact. - t = Thread.new(systemd_database_service) { |systemd_database_service| + t = Thread.new(systemd_database_service) { |start_stop_cmd, systemd_database_service| sleep 20 cmd = start_stop_cmd % { action: 'start', service: systemd_database_service }