> #### `var stub = sinon.stub(obj);`
Stubs all the object’s methods. Note that it’s usually better practice to stub individual methods, particularly on objects that you don’t understand or control all the methods for (e.g. library dependencies). Stubbing individual methods tests intent more precisely and is less susceptible to unexpected behavior as the object’s code evolves.

> If you want to create a stub object of MyConstructor, but don’t want the constructor to be invoked, use this utility function.

> ```js
> var stub = sinon.createStubInstance(MyConstructor)
> ```
> – [Sinon Stubs API Docs](http://sinonjs.org/docs/#stubs)