Fix spec to check retval instead of stdout

stdout check is fine for untidy module, since it needs messages.
GSoC/Meterpreter_Web_Console
William Vu 2018-07-17 18:19:09 -05:00
parent ae9677c1c2
commit 1f887b3e19
1 changed files with 8 additions and 6 deletions

View File

@ -8,11 +8,12 @@ RSpec.describe Msftidy do
let(:msftidy) { Msftidy.new(auxiliary_tidy) }
before(:each) do
@msftidy_stdout = get_stdout { msftidy.run_checks }
msftidy.run_checks
@msftidy_status = msftidy.status
end
it "outputs nothing" do
expect(@msftidy_stdout).to be_empty
it "returns zero (no warnings or errors)" do
expect(@msftidy_status).to be_zero
end
end
@ -38,11 +39,12 @@ RSpec.describe Msftidy do
let(:msftidy) { Msftidy.new(payload_tidy) }
before(:each) do
@msftidy_stdout = get_stdout { msftidy.run_checks }
msftidy.run_checks
@msftidy_status = msftidy.status
end
it "outputs nothing" do
expect(@msftidy_stdout).to be_empty
it "returns zero (no warnings or errors)" do
expect(@msftidy_status).to be_zero
end
end
end