Created
September 25, 2012 19:26
-
-
Save JoeChapman/3783909 to your computer and use it in GitHub Desktop.
Mocking a constructor function
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var mockObject = spyOn(object, Constructor).andCallFake(function () { | |
| return { | |
| method1: function () {}, | |
| method2: function () {} | |
| }; | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment