Because you can now easily do that with can.fixture.store:
- var todoStore = can.fixture.store(100, function(i){
- return {
- id: i,
- name: "todo number "+i,
- description: "a description of some todo",
- ownerId: can.fixture.rand(10)
- }
- });
- can.fixture({
- 'GET /todos': todoStore.findAll,
- 'GET /todos/{id}': todoStore.findOne,
- 'POST /todos': todoStore.create,
- 'PUT /todos/{id}': todoStore.update,
- 'DELETE /todos/{id}': todoStore.destroy
- });
The advantage is that you don't have to add fixture information to your actual AJAX call. You can just put it wherever and include it only when testing.