Skip to content

Commit

Permalink
Merge pull request #1213 from tiemevanveen/docs-restore
Browse files Browse the repository at this point in the history
Added documentation for sinon.restore()
  • Loading branch information
mroderick authored Dec 27, 2016
2 parents 64ff97e + 25aea44 commit 02bbc83
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 02bbc83

Please sign in to comment.