Currently, to create mocks: ``` var mock = sinon.mock(myObject); mock.expects('myMethod').once(); ... mock.verify(); ``` What about adding a mock factory such that: ``` mocks.create('myMethod', myObject, 'myMethod'); mocks.myMethod; mocks.get(myMethod); // get the mock object mocks.restore(myMethod); mocks.myMethod.restore; // restore mocks.myMethod.once(); mocks.myMethod.verify(); // verify //or expect(mocks.myMethod).to.have.been.called(); ``` Suggestions?
Currently, to create mocks:
What about adding a mock factory such that:
Suggestions?