From sinon.test(). It creates a sandbox which handles the restore for you.
On 18 Feb 2014 00:00, "Spike Brehm" <notifications@github.com> wrote:

> In test/server/server.test.js:
>
> >      Server = require('../../server/server');
> >
> > -describe("server/server", function() {
> > +chai.use(sinonChai);
> > +
> > +describe('server/server', function() {
> > +  var server;
> > +
> > +  beforeEach(function () {
> > +    server = new Server();
> > +  });
> > +
> > +  it('should warn if deprecated global rendr object is used', sinon.test(function () {
> > +    var warn = this.stub(console, 'warn');
>
> Do we need to restore the stub manually? Or does this.stub() take care of
> this? Where does this.stub() come from, sinon-chai?
>
> --
> Reply to this email directly or view it on GitHub<https://github.com/airbnb/rendr/pull/315/files#r9807294>
> .
>