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

@@ -189,18 +189,9 @@ describe("Spec", function() {
expect(done).toHaveBeenCalled();
});
it("#status returns pending by default", function() {
it("#status returns passing by default", function() {
var spec = new j$.Spec({fn: jasmine.createSpy("spec body")});
expect(spec.status()).toEqual('pending');
});
it("#status returns pending if no expectations were encountered", function() {
var specBody = jasmine.createSpy("spec body"),
spec = new j$.Spec({fn: specBody});
spec.execute();
expect(spec.status()).toEqual('pending');
expect(spec.status()).toEqual('passed');
});
it("#status returns passed if all expectations in the spec have passed", function() {