Created
July 16, 2013 20:35
-
-
Save esmevane/6012419 to your computer and use it in GitHub Desktop.
[ CoffeeScript / Jasmine ] Put this in your jasmine tests to abstract simple .toHaveBeenCalled() patterns
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
expectCall = (object, methodName, action) -> | |
spyOn object, methodName | |
action() | |
expect(object[methodName]).toHaveBeenCalled() | |
expectCall HE.Modal, 'modalDisplay', -> HE.Modal.InitDomPresence() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment