 
 setup = require './setup'
 
-
 # test services
 services =
   'hello':
     serviceName: 'hello'
     service: ({}, done) ->
-      done null, {body: 'hello'}
+      done null, {greeting: 'hello'}
 
   'echo':
     serviceName: 'echo'
     service: ({}, done) ->
-      done()
+      done null, {}
 
 
 # test routes and response values

  {
    serviceName: 'echo'
    method: 'post'
    path: '/'
    postData:
      x: 2
      y: 3

    @server.close()
    done()

  for r in routes
    do (r) ->
      defaultDescription = "it should return expected values " +
                           "for #{r.method.toUpperCase()} #{r.path}"
      description = r.description || defaultDescription

      it description, (done) ->
        req = restler[r.method] (url.resolve @url, r.path)
        should.exist req

        req.once 'complete', (result, response) ->
          should.exist result, 'expected result to exist'
          should.exist response, 'expected response to exist'
          should.exist response.statusCode, 'expected statusCode to exist'

          response.statusCode.should.equal r.expected.statusCode

          done()
