# frozen_string_literal: truerequire'logger'describeQA::Support::Waiterdobeforedologger=::Logger.new$stdoutlogger.level=::Logger::DEBUGQA::Runtime::Logger.logger=loggerenddescribe'.wait'docontext'when the condition is true'doit'logs the start'doexpect{subject.wait(max: 0){}}.tooutput(/with wait: max 0; interval 0.1/).to_stdout_from_any_processendit'logs the end'doexpect{subject.wait(max: 0){}}.tooutput(/ended wait after .* seconds$/).to_stdout_from_any_processendendcontext'when the condition is false'doit'logs the start'doexpect{subject.wait(max: 0){false}}.tooutput(/with wait: max 0; interval 0.1/).to_stdout_from_any_processendit'logs the end'doexpect{subject.wait(max: 0){false}}.tooutput(/ended wait after .* seconds$/).to_stdout_from_any_processendendendend