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