Skip to content

Commit

Permalink
Update bower version, readme
Browse files Browse the repository at this point in the history
  • Loading branch information
jednano committed Dec 8, 2014
1 parent 8ba79a0 commit 024b3d3
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
10 changes: 8 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,13 @@ A FakeHttp module is available for testing. Here's how you require it:
var fakeHttp = require('iso-http/fake');
```

Unlike the real iso-http module, the fake one returns a request object (an instance of FakeHttp.Agent), upon which you can run two methods. The `respondWith` method accepts a fake response object:
NOTE: If you're doing browser tests, you'll need to first reference the [iso-http--fake.js file](https://github.com/jedmao/iso-http/blob/master/dist/iso-http--fake.js) in the head section of your test runner's HTML file:

```html
<script src="bower_components/iso-http--fake.js"></script>
```

Unlike the real iso-http module, the fake one returns a request object (an instance of FakeHttp.Agent), upon which you can run two methods. The first method is `respondWith` and it accepts a fake response object:

```js
it('responds with a fake response', function(done) {
Expand All @@ -120,7 +126,7 @@ it('responds with a fake response', function(done) {
});
```

The `rejectWith` method accepts an error object:
The second method, `rejectWith`, accepts an error object:

```js
it('rejects with an error', function(done) {
Expand Down
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "iso-http",
"version": "0.0.1",
"version": "0.0.2",
"homepage": "https://github.com/jedmao/iso-http",
"authors": [
"Jed Mao <[email protected]>"
Expand Down

0 comments on commit 024b3d3

Please sign in to comment.