Change test for how a spy gets its full name

- Removes another TODO
- A spec uses its full name as soon as it is created (for the result
    object) and so it needed to be tested differently
This commit is contained in:
Sheel Choksi
2013-11-04 21:37:59 -08:00
parent de6a305b44
commit 952eb59707

View File

@@ -208,15 +208,14 @@ describe("Spec", function() {
}); });
it("can return its full name", function() { it("can return its full name", function() {
var spec; var specNameSpy = jasmine.createSpy('specNameSpy').and.returnValue('expected val');
spec = new j$.Spec({
getSpecName: function(passedVal) { var spec = new j$.Spec({
// expect(passedVal).toBe(spec); TODO: a exec time, spec is undefined WTF? getSpecName: specNameSpy
return 'expected val';
}
}); });
expect(spec.getFullName()).toBe('expected val'); expect(spec.getFullName()).toBe('expected val');
expect(specNameSpy).toHaveBeenCalledWith(spec);
}); });
describe("when a spec is marked pending during execution", function() { describe("when a spec is marked pending during execution", function() {