From 4eea00d5429c4f9226d1c7c0f8d01ecfe9f3914c Mon Sep 17 00:00:00 2001 From: Josef Reidinger Date: Mon, 23 Mar 2020 12:23:59 +0100 Subject: [PATCH] make rubocop happy --- library/general/test/popup_test.rb | 32 +++++++++++++++--------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/library/general/test/popup_test.rb b/library/general/test/popup_test.rb index 938130689..08ec97258 100755 --- a/library/general/test/popup_test.rb +++ b/library/general/test/popup_test.rb @@ -44,25 +44,25 @@ end describe ".SuppressFeedback" do - before do - allow(ui).to receive(:BusyCursor) - allow(ui).to receive(:GetDisplayInfo).and_return({}) - end - - it "closes a popup dialog and opens it at the end when feedback is shown" do - # twice as first is done by Feedback and second by SuppressFeedback - expect(ui).to receive(:OpenDialog).twice - expect(ui).to receive(:CloseDialog).twice - subject.Feedback("test", "test") do - subject.SuppressFeedback {} - end - end + before do + allow(ui).to receive(:BusyCursor) + allow(ui).to receive(:GetDisplayInfo).and_return({}) + end - it "just call block if no feedback is given" do - expect(ui).to_not receive(:OpenDialog) - expect(ui).to_not receive(:CloseDialog) + it "closes a popup dialog and opens it at the end when feedback is shown" do + # twice as first is done by Feedback and second by SuppressFeedback + expect(ui).to receive(:OpenDialog).twice + expect(ui).to receive(:CloseDialog).twice + subject.Feedback("test", "test") do subject.SuppressFeedback {} end + end + + it "just call block if no feedback is given" do + expect(ui).to_not receive(:OpenDialog) + expect(ui).to_not receive(:CloseDialog) + subject.SuppressFeedback {} + end context "when block is missing" do it "raises exception" do