Permalink
Browse files

spec requested by infews re: spy removal when created by createSpy

  • Loading branch information...
1 parent aad60c9 commit e9b3ddcc0ac927a9d625f7749d21f6144db2a86e @bloveridge committed Apr 18, 2011
Showing with 12 additions and 0 deletions.
  1. +12 −0 spec/suites/SpySpec.js
View
@@ -216,4 +216,16 @@ describe('Spies', function () {
});
});
+ describe('createSpy deletion', function() {
+ var TestClass = {}; // ie global "window" object
+ it('should create a spy', function() {
+ TestClass.mySpy = jasmine.createSpy('mySpy');
+ expect(TestClass.mySpy).toEqual(jasmine.any(Function));
+ });
+
+ it('should clean up after itself', function() {
+ expect(TestClass.mySpy).toBeUndefined();
+ });
+ });
+
});

0 comments on commit e9b3ddc

Please sign in to comment.