I am trying to write a simple specification for the Backbone Todos collection, which mutes the Backbone Todo model.
Here is my specification:
describe "TodoApp.Collections.Todos", -> beforeEach -> @todoStub = sinon.stub window, 'TodoApp.Models.Todo' afterEach -> @todoStub.restore()
This gives me the following error:
TypeError: Attempted to wrap undefined property TodoApp.Models.Todo as function
The Todo model is defined as todo = new TodoApp.Models.Todo () does not give an error.
Is this a problem? Can someone point me in the right direction?
smek
source share