Skip to content

Commit

Permalink
Fix 810 - Added documentation for sinon.restore()
Browse files Browse the repository at this point in the history
  • Loading branch information
teameh committed Dec 27, 2016
1 parent c446844 commit 25aea44
Show file tree
Hide file tree
Showing 3 changed files with 60 additions and 0 deletions.
20 changes: 20 additions & 0 deletions docs/_releases/v1.17.6/utils.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,26 @@ Sinon.JS has a few utilities used internally in `lib/sinon.js`. Unless the metho

## Utils API

#### `sinon.restore(object);`

Restores all fake methods of supplied object

```javascript
sinon.stub(obj);

// run tests...

sinon.restore(obj);
```

#### `sinon.restore(method);`

Restores supplied method

```javascript
sinon.restore(obj.someMethod);
```

#### `sinon.createStubInstance(constructor);`

Creates a new object with the given function as the protoype and stubs all implemented functions.
Expand Down
20 changes: 20 additions & 0 deletions docs/_releases/v2.0.0-pre.4/utils.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,26 @@ Sinon.JS has a few utilities used internally in `lib/sinon.js`. Unless the metho

## Utils API

#### `sinon.restore(object);`

Restores all fake methods of supplied object

```javascript
sinon.stub(obj);

// run tests...

sinon.restore(obj);
```

#### `sinon.restore(method);`

Restores supplied method

```javascript
sinon.restore(obj.someMethod);
```

#### `sinon.createStubInstance(constructor);`

Creates a new object with the given function as the protoype and stubs all implemented functions.
Expand Down
20 changes: 20 additions & 0 deletions docs/release-source/release/utils.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,26 @@ Sinon.JS has a few utilities used internally in `lib/sinon.js`. Unless the metho

## Utils API

#### `sinon.restore(object);`

Restores all fake methods of supplied object

```javascript
sinon.stub(obj);

// run tests...

sinon.restore(obj);
```

#### `sinon.restore(method);`

Restores supplied method

```javascript
sinon.restore(obj.someMethod);
```

#### `sinon.createStubInstance(constructor);`

Creates a new object with the given function as the protoype and stubs all implemented functions.
Expand Down

0 comments on commit 25aea44

Please sign in to comment.