   @child.on "message", -> callback()
   @child.stdout.on "data", (data) -> console.log data.toString()
 
-# Closes the server child process, used in an `after` hook and on 
+# Closes the server child process, used in an `after` hook and on
 # `process.exit` in case the test suite is interupted.
 @closeServer = =>
   @child?.kill()

  return callback() if @child?
  envVars =
    NODE_ENV: "test"
    ARTSY_URL: "http://localhost:5000/__api"
    PORT: 5000
  envVars[k] = val for k, val of process.env when not envVars[k]?
  @child = spawn "make", ["s"],


process.on "exit", @closeServer

# You can debug your integration app and run this app server by running
# this module directly and opening up localhost:5000.
# e.g. `coffee test/helpers/integration.coffee`
return unless module is require.main
