RUBY-8737: fixed test failures cause by fix for the ticket.

Need to move check for null one level deeper.
This commit is contained in:
Oleg Sukhodolsky
2012-07-10 12:01:21 +04:00
parent c0fb8c890b
commit 463083bfe0
@@ -69,22 +69,21 @@ public class TestFailedState extends AbstractState {
{
boolean addMark = setMark;
for (final String errorText : errorPresentationText) {
printer.print(CompositePrintable.NEW_LINE, ConsoleViewContentType.ERROR_OUTPUT);
if (addMark) {
printer.mark();
addMark = false;
if (errorText != null) {
printer.print(CompositePrintable.NEW_LINE, ConsoleViewContentType.ERROR_OUTPUT);
if (addMark) {
printer.mark();
addMark = false;
}
printer.print(errorText, ConsoleViewContentType.ERROR_OUTPUT);
}
printer.print(errorText, ConsoleViewContentType.ERROR_OUTPUT);
}
}
@Override
public void printOn(final Printer printer) {
super.printOn(printer);
if (myPresentationText != null) {
printError(printer, myPresentationText);
}
printError(printer, myPresentationText);
}
public boolean isDefect() {