コード例 #1
0
 dbCreateWhenExists: (dbName) => {
   rethink.dbCreate.restore();
   rethink.dbList.restore();
   sinon.stub(rethink, 'dbList').returns(createRunnable([dbName]));
   const mockRethink = sinon.mock(rethink);
   return mockRethink
     .expects('dbCreate')
     .returns(createRunnable());
 },
コード例 #2
0
function restore() {
  rethink.connect.restore();
  rethink.db.restore();
  rethink.dbList.restore();
  rethink.dbCreate.restore();
}