sebarmeli/bamboo-api — pull request #2 by fosco-maestro (2014-07-22 15:04:14+00:00)
Title: updated version of mocha and nock for following projects

Since unit test was failing with following error message:

```
% npm test ~/Projects/bamboo-api:master

> bamboo-api@0.0.2 test /Users/pavlo/Projects/bamboo-api
> mocha

․․․․․․․․․․․․․․․․․

✖ 6 of 18 tests failed:

1) bamboo.getLatestSuccessfulBuilNumber returns the latest successful build number:
TypeError: Cannot read property 'readable' of undefined
at IncomingMessage._read (http.js:347:18)
at IncomingMessage.Readable.read (_stream_readable.js:320:10)
at IncomingMessage.read (http.js:339:15)
at IncomingMessage. (_stream_readable.js:744:45)
at IncomingMessage.EventEmitter.emit (events.js:92:17)
at emitDataEvents (_stream_readable.js:770:10)
at IncomingMessage.Readable.on (_stream_readable.js:691:5)
at OverridenClientRequest. (/Users/pavlo/Projects/bamboo-api/node_modules/request/main.js:611:16)
at OverridenClientRequest.EventEmitter.emit (events.js:95:17)
at /Users/pavlo/Projects/bamboo-api/node_modules/nock/lib/request_overrider.js:220:11
at process._tickCallback (node.js:419:13)
at Function.Module.runMain (module.js:499:11)
at startup (node.js:119:16)
at node.js:906:3

2) bamboo.getBuildStatus returns the build Status:
TypeError: Cannot read property 'readable' of undefined
at IncomingMessage._read (http.js:347:18)
at IncomingMessage.Readable.read (_stream_readable.js:320:10)
at IncomingMessage.read (http.js:339:15)
at IncomingMessage. (_stream_readable.js:744:45)
at IncomingMessage.EventEmitter.emit (events.js:92:17)
at emitDataEvents (_stream_readable.js:770:10)
at IncomingMessage.Readable.on (_stream_readable.js:691:5)
at OverridenClientRequest. (/Users/pavlo/Projects/bamboo-api/node_modules/request/main.js:611:16)
at OverridenClientRequest.EventEmitter.emit (events.js:95:17)
at /Users/pavlo/Projects/bamboo-api/node_modules/nock/lib/request_overrider.js:220:11
at process._tickCallback (node.js:419:13)
at process._tickFromSpinner (node.js:394:15)

3) bamboo.getAllPlans returns a list of all plans available:
TypeError: Cannot read property 'readable' of undefined
at IncomingMessage._read (http.js:347:18)
at IncomingMessage.Readable.read (_stream_readable.js:320:10)
at IncomingMessage.read (http.js:339:15)
at IncomingMessage. (_stream_readable.js:744:45)
at IncomingMessage.EventEmitter.emit (events.js:92:17)
at emitDataEvents (_stream_readable.js:770:10)
at IncomingMessage.Readable.on (_stream_readable.js:691:5)
at OverridenClientRequest. (/Users/pavlo/Projects/bamboo-api/node_modules/request/main.js:611:16)
at OverridenClientRequest.EventEmitter.emit (events.js:95:17)
at /Users/pavlo/Projects/bamboo-api/node_modules/nock/lib/request_overrider.js:220:11
at process._tickCallback (node.js:419:13)

4) bamboo.getLatestSuccessfulBuilNumber returns a msg when the plan doesn't contain any successful build:
TypeError: Cannot read property 'readable' of undefined
at IncomingMessage._read (http.js:347:18)
at IncomingMessage.Readable.read (_stream_readable.js:320:10)
at IncomingMessage.read (http.js:339:15)
at IncomingMessage. (_stream_readable.js:744:45)
at IncomingMessage.EventEmitter.emit (events.js:92:17)
at emitDataEvents (_stream_readable.js:770:10)
at IncomingMessage.Readable.on (_stream_readable.js:691:5)
at OverridenClientRequest. (/Users/pavlo/Projects/bamboo-api/node_modules/request/main.js:611:16)
at OverridenClientRequest.EventEmitter.emit (events.js:95:17)
at /Users/pavlo/Projects/bamboo-api/node_modules/nock/lib/request_overrider.js:220:11
at process._tickCallback (node.js:419:13)

5) bamboo.getAllPlans returns a string saying that there are no plans:
TypeError: Cannot read property 'readable' of undefined
at IncomingMessage._read (http.js:347:18)
at IncomingMessage.Readable.read (_stream_readable.js:320:10)
at IncomingMessage.read (http.js:339:15)
at IncomingMessage. (_stream_readable.js:744:45)
at IncomingMessage.EventEmitter.emit (events.js:92:17)
at emitDataEvents (_stream_readable.js:770:10)
at IncomingMessage.Readable.on (_stream_readable.js:691:5)
at OverridenClientRequest. (/Users/pavlo/Projects/bamboo-api/node_modules/request/main.js:611:16)
at OverridenClientRequest.EventEmitter.emit (events.js:95:17)
at /Users/pavlo/Projects/bamboo-api/node_modules/nock/lib/request_overrider.js:220:11
at process._tickCallback (node.js:419:13)

6) bamboo.getAllPlans returns a string saying that there are no plans:
TypeError: Cannot read property 'readable' of undefined
at IncomingMessage._read (http.js:347:18)
at IncomingMessage.Readable.read (_stream_readable.js:320:10)
at IncomingMessage.read (http.js:339:15)
at IncomingMessage. (_stream_readable.js:744:45)
at IncomingMessage.EventEmitter.emit (events.js:92:17)
at emitDataEvents (_stream_readable.js:770:10)
at IncomingMessage.Readable.on (_stream_readable.js:691:5)
at OverridenClientRequest. (/Users/pavlo/Projects/bamboo-api/node_modules/request/main.js:611:16)
at OverridenClientRequest.EventEmitter.emit (events.js:95:17)
at /Users/pavlo/Projects/bamboo-api/node_modules/nock/lib/request_overrider.js:220:11
at process._tickCallback (node.js:419:13)

npm ERR! Test failed. See above for more details.
npm ERR! not ok code 0
```

Found that is bug in old version of module 'nock': https://github.com/pgte/nock/issues/146

So updated version of mocha and nock, should fix issues with tests.