Skip to content

Commit

Permalink
Fix quoting by removing superfluous backslashes.
Browse files Browse the repository at this point in the history
  • Loading branch information
dougo committed Feb 26, 2017
1 parent 46e41c8 commit 49c8877
Show file tree
Hide file tree
Showing 22 changed files with 65 additions and 65 deletions.
2 changes: 1 addition & 1 deletion docs/_releases/v1.17.6/mocks.md
Expand Up @@ -63,7 +63,7 @@ Creates a mock for the provided object.
Does not change the object, but returns a mock object to set expectations on the object's methods.


#### `var expectation = mock.expects(\"method\");`
#### `var expectation = mock.expects("method");`

Overrides `obj.method` with a mock function and returns it.

Expand Down
2 changes: 1 addition & 1 deletion docs/_releases/v1.17.6/sandbox.md
Expand Up @@ -61,7 +61,7 @@ sinon.defaultConfig = {
<dt><code>useFakeServer</code></dt>
<dd>If <code>true</code>, <code>server</code> and <code>requests</code> properties are added to the sandbox. Can also be an object to use for fake server. The default one is <code>sinon.fakeServer</code>, but if you're using jQuery 1.3.x or some other library that does not set the XHR's <code>onreadystatechange</code> handler, you might want to do:

<pre class=\"code-snippet\" data-lang=\"javascript\"><code>sinon.config = {
<pre class="code-snippet" data-lang="javascript"><code>sinon.config = {
useFakeServer: sinon.fakeServerWithClock
};</code></pre></dd>
</dl>
Expand Down
6 changes: 3 additions & 3 deletions docs/_releases/v1.17.6/spies.md
Expand Up @@ -299,7 +299,7 @@ This behaves the same as `spy.neverCalledWith(sinon.match(arg1), sinon.match(arg
Returns `true` if spy threw an exception at least once.


#### `spy.threw(\"TypeError\");`
#### `spy.threw("TypeError");`

Returns `true` if spy threw an exception of the provided type at least once.

Expand All @@ -314,7 +314,7 @@ Returns `true` if spy threw the provided exception object at least once.
Returns `true` if spy always threw an exception.


#### `spy.alwaysThrew(\"TypeError\");`
#### `spy.alwaysThrew("TypeError");`

Returns `true` if spy always threw an exception of the provided type.

Expand Down Expand Up @@ -462,7 +462,7 @@ This behaves the same as `spyCall.notCalledWith(sinon.match(arg1), sinon.match(a
Returns `true` if call threw an exception.


#### `spyCall.threw(TypeError\");`
#### `spyCall.threw("TypeError");`

Returns `true` if call threw exception of provided type.

Expand Down
12 changes: 6 additions & 6 deletions docs/_releases/v1.17.6/stubs.md
Expand Up @@ -70,13 +70,13 @@ href="#stub-onCall"><code>onCall</code></a> API.
Creates an anonymous stub function


#### `var stub = sinon.stub(object, \"method\");`
#### `var stub = sinon.stub(object, "method");`

Replaces `object.method` with a stub function. An exception is thrown if the property is not already a function.

The original function can be restored by calling `object.method.restore();` (or `stub.restore();`).

#### `var stub = sinon.stub(object, \"method\", func);`
#### `var stub = sinon.stub(object, "method", func);`

Replaces `object.method` with a `func`, wrapped in a `spy`.

Expand All @@ -103,7 +103,7 @@ Stubs the method only for the provided arguments.
This is useful to be more expressive in your assertions, where you can access the spy with the same call. It is also useful to create a stub that can act differently in response to different arguments.

```javascript
"test should stub method differently based on arguments\": function () {
"test should stub method differently based on arguments": function () {
var callback = sinon.stub();
callback.withArgs(42).returns(1);
callback.withArgs(1).throws("TypeError");
Expand All @@ -119,7 +119,7 @@ This is useful to be more expressive in your assertions, where you can access th
Defines the behavior of the stub on the *nth* call. Useful for testing sequential interactions.

```javascript
"test should stub method differently on consecutive calls\": function () {
"test should stub method differently on consecutive calls": function () {
var callback = sinon.stub();
callback.onCall(0).returns(1);
callback.onCall(1).returns(2);
Expand All @@ -136,7 +136,7 @@ There are methods `onFirstCall`, `onSecondCall`,`onThirdCall` to make stub defin
`onCall` can be combined with all of the behavior defining methods in this section. In particular, it can be used together with `withArgs`.

```javascript
"test should stub method differently on consecutive calls with certain argument\": function () {
"test should stub method differently on consecutive calls with certain argument": function () {
var callback = sinon.stub();
callback.withArgs(42)
.onFirstCall().returns(1)
Expand Down Expand Up @@ -264,7 +264,7 @@ Like `yields`, `yieldsTo` grabs the first matching argument, finds the callback
Like above but with an additional parameter to pass the `this` context."

```javascript
"test should fake successful ajax request\": function () {
"test should fake successful ajax request": function () {
sinon.stub(jQuery, "ajax").yieldsTo("success", [1, 2, 3]);

jQuery.ajax({
Expand Down
2 changes: 1 addition & 1 deletion docs/_releases/v1.17.7/mocks.md
Expand Up @@ -63,7 +63,7 @@ Creates a mock for the provided object.
Does not change the object, but returns a mock object to set expectations on the object's methods.


#### `var expectation = mock.expects(\"method\");`
#### `var expectation = mock.expects("method");`

Overrides `obj.method` with a mock function and returns it.

Expand Down
2 changes: 1 addition & 1 deletion docs/_releases/v1.17.7/sandbox.md
Expand Up @@ -61,7 +61,7 @@ sinon.defaultConfig = {
<dt><code>useFakeServer</code></dt>
<dd>If <code>true</code>, <code>server</code> and <code>requests</code> properties are added to the sandbox. Can also be an object to use for fake server. The default one is <code>sinon.fakeServer</code>, but if you're using jQuery 1.3.x or some other library that does not set the XHR's <code>onreadystatechange</code> handler, you might want to do:

<pre class=\"code-snippet\" data-lang=\"javascript\"><code>sinon.config = {
<pre class="code-snippet" data-lang="javascript"><code>sinon.config = {
useFakeServer: sinon.fakeServerWithClock
};</code></pre></dd>
</dl>
Expand Down
6 changes: 3 additions & 3 deletions docs/_releases/v1.17.7/spies.md
Expand Up @@ -299,7 +299,7 @@ This behaves the same as `spy.neverCalledWith(sinon.match(arg1), sinon.match(arg
Returns `true` if spy threw an exception at least once.


#### `spy.threw(\"TypeError\");`
#### `spy.threw("TypeError");`

Returns `true` if spy threw an exception of the provided type at least once.

Expand All @@ -314,7 +314,7 @@ Returns `true` if spy threw the provided exception object at least once.
Returns `true` if spy always threw an exception.


#### `spy.alwaysThrew(\"TypeError\");`
#### `spy.alwaysThrew("TypeError");`

Returns `true` if spy always threw an exception of the provided type.

Expand Down Expand Up @@ -462,7 +462,7 @@ This behaves the same as `spyCall.notCalledWith(sinon.match(arg1), sinon.match(a
Returns `true` if call threw an exception.


#### `spyCall.threw(TypeError\");`
#### `spyCall.threw("TypeError");`

Returns `true` if call threw exception of provided type.

Expand Down
12 changes: 6 additions & 6 deletions docs/_releases/v1.17.7/stubs.md
Expand Up @@ -70,13 +70,13 @@ href="#stub-onCall"><code>onCall</code></a> API.
Creates an anonymous stub function


#### `var stub = sinon.stub(object, \"method\");`
#### `var stub = sinon.stub(object, "method");`

Replaces `object.method` with a stub function. An exception is thrown if the property is not already a function.

The original function can be restored by calling `object.method.restore();` (or `stub.restore();`).

#### `var stub = sinon.stub(object, \"method\", func);`
#### `var stub = sinon.stub(object, "method", func);`

Replaces `object.method` with a `func`, wrapped in a `spy`.

Expand All @@ -103,7 +103,7 @@ Stubs the method only for the provided arguments.
This is useful to be more expressive in your assertions, where you can access the spy with the same call. It is also useful to create a stub that can act differently in response to different arguments.

```javascript
"test should stub method differently based on arguments\": function () {
"test should stub method differently based on arguments": function () {
var callback = sinon.stub();
callback.withArgs(42).returns(1);
callback.withArgs(1).throws("TypeError");
Expand All @@ -119,7 +119,7 @@ This is useful to be more expressive in your assertions, where you can access th
Defines the behavior of the stub on the *nth* call. Useful for testing sequential interactions.

```javascript
"test should stub method differently on consecutive calls\": function () {
"test should stub method differently on consecutive calls": function () {
var callback = sinon.stub();
callback.onCall(0).returns(1);
callback.onCall(1).returns(2);
Expand All @@ -136,7 +136,7 @@ There are methods `onFirstCall`, `onSecondCall`,`onThirdCall` to make stub defin
`onCall` can be combined with all of the behavior defining methods in this section. In particular, it can be used together with `withArgs`.

```javascript
"test should stub method differently on consecutive calls with certain argument\": function () {
"test should stub method differently on consecutive calls with certain argument": function () {
var callback = sinon.stub();
callback.withArgs(42)
.onFirstCall().returns(1)
Expand Down Expand Up @@ -264,7 +264,7 @@ Like `yields`, `yieldsTo` grabs the first matching argument, finds the callback
Like above but with an additional parameter to pass the `this` context."

```javascript
"test should fake successful ajax request\": function () {
"test should fake successful ajax request": function () {
sinon.stub(jQuery, "ajax").yieldsTo("success", [1, 2, 3]);

jQuery.ajax({
Expand Down
2 changes: 1 addition & 1 deletion docs/_releases/v2.0.0-pre.4/mocks.md
Expand Up @@ -63,7 +63,7 @@ Creates a mock for the provided object.
Does not change the object, but returns a mock object to set expectations on the object's methods.


#### `var expectation = mock.expects(\"method\");`
#### `var expectation = mock.expects("method");`

Overrides `obj.method` with a mock function and returns it.

Expand Down
2 changes: 1 addition & 1 deletion docs/_releases/v2.0.0-pre.4/sandbox.md
Expand Up @@ -76,7 +76,7 @@ sinon.defaultConfig = {
<dt><code>useFakeServer</code></dt>
<dd>If <code>true</code>, <code>server</code> and <code>requests</code> properties are added to the sandbox. Can also be an object to use for fake server. The default one is <code>sinon.fakeServer</code>, but if you're using jQuery 1.3.x or some other library that does not set the XHR's <code>onreadystatechange</code> handler, you might want to do:

<pre class=\"code-snippet\" data-lang=\"javascript\"><code>sinon.config = {
<pre class="code-snippet" data-lang="javascript"><code>sinon.config = {
useFakeServer: sinon.fakeServerWithClock
};</code></pre></dd>
</dl>
Expand Down
6 changes: 3 additions & 3 deletions docs/_releases/v2.0.0-pre.4/spies.md
Expand Up @@ -299,7 +299,7 @@ This behaves the same as `spy.neverCalledWith(sinon.match(arg1), sinon.match(arg
Returns `true` if spy threw an exception at least once.


#### `spy.threw(\"TypeError\");`
#### `spy.threw("TypeError");`

Returns `true` if spy threw an exception of the provided type at least once.

Expand All @@ -314,7 +314,7 @@ Returns `true` if spy threw the provided exception object at least once.
Returns `true` if spy always threw an exception.


#### `spy.alwaysThrew(\"TypeError\");`
#### `spy.alwaysThrew("TypeError");`

Returns `true` if spy always threw an exception of the provided type.

Expand Down Expand Up @@ -462,7 +462,7 @@ This behaves the same as `spyCall.notCalledWith(sinon.match(arg1), sinon.match(a
Returns `true` if call threw an exception.


#### `spyCall.threw(TypeError\");`
#### `spyCall.threw("TypeError");`

Returns `true` if call threw exception of provided type.

Expand Down
12 changes: 6 additions & 6 deletions docs/_releases/v2.0.0-pre.4/stubs.md
Expand Up @@ -70,13 +70,13 @@ href="#stub-onCall"><code>onCall</code></a> API.
Creates an anonymous stub function


#### `var stub = sinon.stub(object, \"method\");`
#### `var stub = sinon.stub(object, "method");`

Replaces `object.method` with a stub function. An exception is thrown if the property is not already a function.

The original function can be restored by calling `object.method.restore();` (or `stub.restore();`).

#### `var stub = sinon.stub(object, \"method\", func);`
#### `var stub = sinon.stub(object, "method", func);`

Replaces `object.method` with a `func`, wrapped in a `spy`.

Expand All @@ -103,7 +103,7 @@ Stubs the method only for the provided arguments.
This is useful to be more expressive in your assertions, where you can access the spy with the same call. It is also useful to create a stub that can act differently in response to different arguments.

```javascript
"test should stub method differently based on arguments\": function () {
"test should stub method differently based on arguments": function () {
var callback = sinon.stub();
callback.withArgs(42).returns(1);
callback.withArgs(1).throws("TypeError");
Expand All @@ -119,7 +119,7 @@ This is useful to be more expressive in your assertions, where you can access th
Defines the behavior of the stub on the *nth* call. Useful for testing sequential interactions.

```javascript
"test should stub method differently on consecutive calls\": function () {
"test should stub method differently on consecutive calls": function () {
var callback = sinon.stub();
callback.onCall(0).returns(1);
callback.onCall(1).returns(2);
Expand All @@ -136,7 +136,7 @@ There are methods `onFirstCall`, `onSecondCall`,`onThirdCall` to make stub defin
`onCall` can be combined with all of the behavior defining methods in this section. In particular, it can be used together with `withArgs`.

```javascript
"test should stub method differently on consecutive calls with certain argument\": function () {
"test should stub method differently on consecutive calls with certain argument": function () {
var callback = sinon.stub();
callback.withArgs(42)
.onFirstCall().returns(1)
Expand Down Expand Up @@ -286,7 +286,7 @@ Like `yields`, `yieldsTo` grabs the first matching argument, finds the callback
Like above but with an additional parameter to pass the `this` context."

```javascript
"test should fake successful ajax request\": function () {
"test should fake successful ajax request": function () {
sinon.stub(jQuery, "ajax").yieldsTo("success", [1, 2, 3]);

jQuery.ajax({
Expand Down
2 changes: 1 addition & 1 deletion docs/_releases/v2.0.0-pre.5/mocks.md
Expand Up @@ -63,7 +63,7 @@ Creates a mock for the provided object.
Does not change the object, but returns a mock object to set expectations on the object's methods.


#### `var expectation = mock.expects(\"method\");`
#### `var expectation = mock.expects("method");`

Overrides `obj.method` with a mock function and returns it.

Expand Down
2 changes: 1 addition & 1 deletion docs/_releases/v2.0.0-pre.5/sandbox.md
Expand Up @@ -76,7 +76,7 @@ sinon.defaultConfig = {
<dt><code>useFakeServer</code></dt>
<dd>If <code>true</code>, <code>server</code> and <code>requests</code> properties are added to the sandbox. Can also be an object to use for fake server. The default one is <code>sinon.fakeServer</code>, but if you're using jQuery 1.3.x or some other library that does not set the XHR's <code>onreadystatechange</code> handler, you might want to do:

<pre class=\"code-snippet\" data-lang=\"javascript\"><code>sinon.config = {
<pre class="code-snippet" data-lang="javascript"><code>sinon.config = {
useFakeServer: sinon.fakeServerWithClock
};</code></pre></dd>
</dl>
Expand Down
6 changes: 3 additions & 3 deletions docs/_releases/v2.0.0-pre.5/spies.md
Expand Up @@ -299,7 +299,7 @@ This behaves the same as `spy.neverCalledWith(sinon.match(arg1), sinon.match(arg
Returns `true` if spy threw an exception at least once.


#### `spy.threw(\"TypeError\");`
#### `spy.threw("TypeError");`

Returns `true` if spy threw an exception of the provided type at least once.

Expand All @@ -314,7 +314,7 @@ Returns `true` if spy threw the provided exception object at least once.
Returns `true` if spy always threw an exception.


#### `spy.alwaysThrew(\"TypeError\");`
#### `spy.alwaysThrew("TypeError");`

Returns `true` if spy always threw an exception of the provided type.

Expand Down Expand Up @@ -462,7 +462,7 @@ This behaves the same as `spyCall.notCalledWith(sinon.match(arg1), sinon.match(a
Returns `true` if call threw an exception.


#### `spyCall.threw(TypeError\");`
#### `spyCall.threw("TypeError");`

Returns `true` if call threw exception of provided type.

Expand Down
12 changes: 6 additions & 6 deletions docs/_releases/v2.0.0-pre.5/stubs.md
Expand Up @@ -70,13 +70,13 @@ href="#stub-onCall"><code>onCall</code></a> API.
Creates an anonymous stub function


#### `var stub = sinon.stub(object, \"method\");`
#### `var stub = sinon.stub(object, "method");`

Replaces `object.method` with a stub function. An exception is thrown if the property is not already a function.

The original function can be restored by calling `object.method.restore();` (or `stub.restore();`).

#### `var stub = sinon.stub(object, \"method\", func);`
#### `var stub = sinon.stub(object, "method", func);`

Replaces `object.method` with a `func`, wrapped in a `spy`.

Expand All @@ -103,7 +103,7 @@ Stubs the method only for the provided arguments.
This is useful to be more expressive in your assertions, where you can access the spy with the same call. It is also useful to create a stub that can act differently in response to different arguments.

```javascript
"test should stub method differently based on arguments\": function () {
"test should stub method differently based on arguments": function () {
var callback = sinon.stub();
callback.withArgs(42).returns(1);
callback.withArgs(1).throws("TypeError");
Expand All @@ -119,7 +119,7 @@ This is useful to be more expressive in your assertions, where you can access th
Defines the behavior of the stub on the *nth* call. Useful for testing sequential interactions.

```javascript
"test should stub method differently on consecutive calls\": function () {
"test should stub method differently on consecutive calls": function () {
var callback = sinon.stub();
callback.onCall(0).returns(1);
callback.onCall(1).returns(2);
Expand All @@ -136,7 +136,7 @@ There are methods `onFirstCall`, `onSecondCall`,`onThirdCall` to make stub defin
`onCall` can be combined with all of the behavior defining methods in this section. In particular, it can be used together with `withArgs`.

```javascript
"test should stub method differently on consecutive calls with certain argument\": function () {
"test should stub method differently on consecutive calls with certain argument": function () {
var callback = sinon.stub();
callback.withArgs(42)
.onFirstCall().returns(1)
Expand Down Expand Up @@ -286,7 +286,7 @@ Like `yields`, `yieldsTo` grabs the first matching argument, finds the callback
Like above but with an additional parameter to pass the `this` context."

```javascript
"test should fake successful ajax request\": function () {
"test should fake successful ajax request": function () {
sinon.stub(jQuery, "ajax").yieldsTo("success", [1, 2, 3]);

jQuery.ajax({
Expand Down

0 comments on commit 49c8877

Please sign in to comment.