Skip to content

Commit

Permalink
make rubocop happy
Browse files Browse the repository at this point in the history
  • Loading branch information
jreidinger committed Mar 23, 2020
1 parent 5515aa4 commit 4eea00d
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions library/general/test/popup_test.rb
Expand Up @@ -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
Expand Down

0 comments on commit 4eea00d

Please sign in to comment.