From 9f7ebe06995cd5eb9a4c42cde96d91444f80aaaa Mon Sep 17 00:00:00 2001 From: Stefan Schubert Date: Mon, 29 Oct 2018 13:10:47 +0100 Subject: [PATCH] rubocop --- src/lib/installation/clients/save_y2logs.rb | 11 ++++++----- test/lib/clients/save_y2logs_test.rb | 12 +++++++----- 2 files changed, 13 insertions(+), 10 deletions(-) diff --git a/src/lib/installation/clients/save_y2logs.rb b/src/lib/installation/clients/save_y2logs.rb index 0bed43a68..093a18d2e 100644 --- a/src/lib/installation/clients/save_y2logs.rb +++ b/src/lib/installation/clients/save_y2logs.rb @@ -13,12 +13,13 @@ def main if ProductFeatures.GetBooleanFeature("globals", "save_y2logs") target_path = ::File.join( - Yast::Installation.destdir, - Yast::Directory.logdir) + Yast::Installation.destdir, + Yast::Directory.logdir + ) - WFM.Execute(Yast::Path.new(".local.bash"), - "/usr/sbin/save_y2logs '#{target_path}/yast-installation-logs.tar.xz'") + WFM.Execute(Yast::Path.new(".local.bash"), + "/usr/sbin/save_y2logs '#{target_path}/yast-installation-logs.tar.xz'") end end - end + end end diff --git a/test/lib/clients/save_y2logs_test.rb b/test/lib/clients/save_y2logs_test.rb index aad4130b8..eb3314d42 100755 --- a/test/lib/clients/save_y2logs_test.rb +++ b/test/lib/clients/save_y2logs_test.rb @@ -10,13 +10,14 @@ describe "#main" do let(:bash_path) { Yast::Path.new(".local.bash") } - + context "globals/save_y2logs in control.xml is false" do it "does not save y2logs" do expect(Yast::ProductFeatures).to receive(:GetBooleanFeature).with("globals", "save_y2logs").and_return(false) expect(Yast::WFM).not_to receive(:Execute).with( - bash_path, - "/usr/sbin/save_y2logs '/var/log/YaST2/yast-installation-logs.tar.xz'") + bash_path, + "/usr/sbin/save_y2logs '/var/log/YaST2/yast-installation-logs.tar.xz'" + ) client.main end end @@ -25,8 +26,9 @@ it "saves y2logs" do expect(Yast::ProductFeatures).to receive(:GetBooleanFeature).with("globals", "save_y2logs").and_return(true) expect(Yast::WFM).to receive(:Execute).with( - bash_path, - "/usr/sbin/save_y2logs '/var/log/YaST2/yast-installation-logs.tar.xz'") + bash_path, + "/usr/sbin/save_y2logs '/var/log/YaST2/yast-installation-logs.tar.xz'" + ) client.main end end