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

  @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 
# `process.exit` in case the test suite is interupted.
@closeServer = =>
  @child?.kill()

#
# Integration test helper that makes it easy to write fast integration tests.
# One of the ways it does this is by providing the methods `startServer` and
# `closeServer` that will spawn a child process of this project. This means
# a version of this project server will run on localhost:5000 using a fake
# API server exposed below a `api`.
#
spawn = require("child_process").spawn
express = require "express"

