A spec without expectations is considered passing

- Specs are passing by default unless told otherwise
- Getting the result.status of a spec before the spec has run is now
  undefined instead of pending

[finishes #59422744]
This commit is contained in:
Sheel Choksi
2013-10-24 11:33:47 -07:00
parent d06da150de
commit 0c6e590a93
2 changed files with 3 additions and 15 deletions

View File

@@ -1,6 +1,5 @@
getJasmineRequireObj().Spec = function(j$) {
function Spec(attrs) {
this.encounteredExpectations = false;
this.expectationFactory = attrs.expectationFactory;
this.resultCallback = attrs.resultCallback || function() {};
this.id = attrs.id;
@@ -26,13 +25,11 @@ getJasmineRequireObj().Spec = function(j$) {
id: this.id,
description: this.description,
fullName: this.getFullName(),
status: this.status(),
failedExpectations: []
};
}
Spec.prototype.addExpectationResult = function(passed, data) {
this.encounteredExpectations = true;
if (passed) {
return;
}
@@ -118,7 +115,7 @@ getJasmineRequireObj().Spec = function(j$) {
return 'disabled';
}
if (this.markedPending || !this.encounteredExpectations) {
if (this.markedPending) {
return 'pending';
}