Created
July 29, 2012 15:46
-
-
Save yangchenyun/3199633 to your computer and use it in GitHub Desktop.
more detailed spy
This file contains 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
it "should call the given method when parameter is valid", -> | |
multipleSpy = sinon.spy sample, 'multiple' | |
sample.calculator('multiple', 1, 2) | |
sinon.assert.calledOnce(multipleSpy) | |
sinon.assert.calledWithExactly(multipleSpy, [1, 2]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment