diff --git a/docs/index.html b/docs/index.html index 3fc9adc..fa476da 100644 --- a/docs/index.html +++ b/docs/index.html @@ -452,8 +452,9 @@

Stub API

Replaces object.method with a stub function. The original function can be restored by calling object.method.restore(); - (or stub.restore();). An exception is thrown if the property - is not already a function, to help avoid typos when stubbing methods. + (or stub.restore(); and sinon.restore(stub);). + An exception is thrown if the property is not already a function, to + help avoid typos when stubbing methods.
var stub = sinon.stub(object, "method", func);
@@ -471,7 +472,8 @@

Stub API

If you want to create a stub object of MyConstructor, but don't want the constructor to be invoked, use this utility function: -
var stub = sinon.createStubInstance(MyConstructor)
+
var stub = sinon.createStubInstance(MyConstructor)

+ Stubbed objects can be restored by sinon.restore(obj);
stub.withArgs(arg1[, arg2, ...]);
@@ -1611,6 +1613,11 @@

Sinon.JS utilities

stubs all implemented functions. The given constructor function is not invoked. See also the stub API.
+
sinon.restore(obj)
+
+ Restores the supplied stub, spy, or restorable methods of a stubbed + object. +
sinon.format(object)
Formats an object for pretty printing in error messages. Sinon < 1.3.0