Unit testing Backbone Model
I'm not really familiar with mocha. If I understand correctly, the true and false values here closely releated, in the sense that they should be opposites:


var stub = sinon.stub(Backbone, "sync", function(method, model) {
    expect(model.get("completed")).to.equal(true);
});

var todo = new app.Todo({completed: false});



In that case, to avoid mistakes, it would be better to include that logic in the code, for example:

var initial_state = false;
var stub = sinon.stub(Backbone, "sync", function(method, model) {
    expect(model.get("completed")).to.equal(initial_state);
});

var todo = new app.Todo({completed: !initial_state});


And maybe add another test for the inverse, for initial_state = true.



Instead of this:


var todo = new app.Todo({completed: false});
todo.toggle();



Since you only use the todo instance once, I would combine the two lines to shorten the code:

new app.Todo({completed: false}).toggle();




Instead of this .to.equal(true):


expect(stub.calledOnce).to.equal(true);



I think it would be more natural (and shorter) with .to.be.ok():

expect(stub.calledOnce).to.be.ok();