Added a call to the RunNotifier's fireTestFinished() method after notifying it of a failed test.

This commit is contained in:
James Dobson 2015-03-30 16:59:55 +01:00
parent 8d914f55bb
commit 968df29e77
2 changed files with 3 additions and 0 deletions

View File

@ -228,6 +228,7 @@ public class JasmineTestRunner extends Runner {
notifier.fireTestFinished(spec.getDescription());
} else if (spec.isFailed(rhinoContext)) {
notifier.fireTestFailure(spec.getJunitFailure(rhinoContext));
notifier.fireTestFinished(spec.getDescription());
} else {
throw new IllegalStateException("Unexpected spec status received: " + spec);
}

View File

@ -32,6 +32,7 @@ public class JasmineFailingSpecsTest {
ArgumentCaptor<Description> descriptionCaptor = ArgumentCaptor.forClass(Description.class);
verify(notifierMock).fireTestStarted(descriptionCaptor.capture());
verify(notifierMock).fireTestFailure(failureCaptor.capture());
verify(notifierMock).fireTestFinished(descriptionCaptor.capture());
verifyNoMoreInteractions(notifierMock);
Failure failure = failureCaptor.getValue();
@ -50,6 +51,7 @@ public class JasmineFailingSpecsTest {
ArgumentCaptor<Description> descriptionCaptor = ArgumentCaptor.forClass(Description.class);
verify(notifierMock).fireTestStarted(descriptionCaptor.capture());
verify(notifierMock).fireTestFailure(failureCaptor.capture());
verify(notifierMock).fireTestFinished(descriptionCaptor.capture());
verifyNoMoreInteractions(notifierMock);
Failure failure = failureCaptor.getValue();