 
 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

    @server.close()
    done()

  it 'should return with a 200 status', (done) ->
    req = restler.get (url.resolve @url, '/hello?x=3')
    should.exist req

    req.on 'complete', (result, response) ->
      console.log result
      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 200

      done()


describe 'with simple services wired to routes', () ->
  beforeEach (done) ->
    {@app, @server, @url} = setup services, routes
    done()

