Skip to content

Instantly share code, notes, and snippets.

@philcockfield
philcockfield / gist:1233928
Created September 22, 2011 03:10
Spying into an anonymous method (Jasmine)
describe 'spying stuff', ->
models = null
resource = null
beforeEach ->
# Fakes - just for writing the sample test.
# You'd use the real methods under test of course.
models =
Item:
findRoot: () -> console.log 'findRoot Called', err, item