     moveTo fixture
     yield shell "rm -rf build"
     moveTo fixture
-    childProcess.fork(BUILD_FILE)
+    yield promise (resolve, reject) ->
+      child = childProcess.fork(BUILD_FILE)
+      child.on 'exit', -> resolve()
     moveHome()
 
 # Predicate, returns true if the `expectedFile` exists

{join} = require "path"
assert = require "assert"
childProcess = require 'child_process'
{shell, sleep, call, exists, chdir} = require "fairmont"

HOME_DIR = join __dirname, "..", ".."
BASE_FIXTURE_DIR = join HOME_DIR, "test", "fixtures"
BUILD_FILE = join __dirname, "builder.coffee"

BUILD_TIMEOUT = 5000

fixtureDir = (fixture) ->
  join BASE_FIXTURE_DIR, fixture


# Asserts that the given test file exists under the fixture's build directory
assertBuilt = (fixture, expectedFile) ->
  assert yield isBuilt(fixture, expectedFile), "File #{expectedFile} not built"

buildAndVerify = (fixture, expectedFile) ->
  call ->
