For expectations


License
MIT
Install
npm install does@0.0.4

Documentation

experimental/unstable api changes will still occur (without deprecation warnings) <br> 0.0.10 license

For spectateability.

does

use via ipso injection decorator

module.exports.start = ({port}) -> 

    server = require('http').createServer()
    server.listen port, -> console.log server.address()
ipso = require 'ipso'

describe 'start()', ->

    it 'starts http at config.port', ipso (facto, http, should) ->

        http.does 
            createServer: ->

                #
                # return mock server to test for listen( port )
                #

                listen: (port, hostname) -> 

                    port.should.equal 3000
                    should.not.exist hostname


            #
            # _createServer: -> console.log '_ denotes spy'
            # 


        start port: 3000
        facto()

use standalone

extends object.prototype with does() and did() for expectation setup and confirmation