Clarification re spy properties.

This commit is contained in:
Christian Williams 2009-07-08 00:07:29 -07:00
parent 6b32586e1f
commit 687b94374c
1 changed files with 4 additions and 0 deletions

View File

@ -347,6 +347,8 @@ There are spy-specfic matchers that are very handy.
`wasNotCalledWith(arguments)` returns true if the object is a spy and was not called with the passed arguments
Spies can be trained to respond in a variety of ways when invoked:
`andCallThrough()`: spies on AND calls the original function spied on
`andReturn(arguments)`: returns passed arguments when spy is called
@ -355,6 +357,8 @@ There are spy-specfic matchers that are very handy.
`andCallFake(function)`: calls passed function when spy is called
Spies have some useful properties:
`callCount`: returns number of times spy was called
`mostRecentCall.args`: returns argument array from last call to spy.