ask11/backbone-id — pull request #2 by amitu (2013-07-19 04:41:33+00:00)
Title: deleting _new on sync end instead of sync start

As discussed I am trying a clean pull. Test is still not done, and I am not sure I understand the test properly.

Here is the portion that has me confused. These are the relevant lines from test:

``` javascript
it('removes _new pseudo attribute on first sync', function() {
var Model = Backbone.Model.extend({
sync: function(method, model, options) {
return expect(method).equal('create');
}
});

Backbone.Id(Model);
var model = new Model({ name: 'test' });
model.save();

expect(_.values(model.attributes)).length(2);
expect(model.isNew()).equal(false);
});
```

What is going on here:

``` javascript
sync: function(method, model, options) {
return expect(method).equal('create');
}
```

How do I fake the .sync success?