When writing OO javascript, you want to use Jasmine to test the
interactions between objects.
Imagine we have we have two classes: resultRenderer and dbQuery.
resultRenderer will ask dbQuery to perform a database query, and
asyncronously receive the results.
So dbQuery needs to call back to resultRenderer once it has the
results.
Take a look at this code:
https://gist.github.com/1145534
Specifically the last line ('What goes here'):
expect(dbQuery.runQueryAsync).toHaveBeenCalledWith(/* What goes here?
*/);
How can you match an argument that is a Function, bound to a specific
object context?