             })
 
         dispatch_async(dispatch_get_main_queue()) {
-            promise.fulfill(2)
+            deferred.fulfill(2)
         }
 
         self.waitForExpectationsWithTimeout(1.0, handler: nil)

    func testPropagateFulfillToChildPromises() {
        let expectation = self.expectationWithDescription("wait")

        let promise = Promise<Int>()

        promise
            .caught({ (e: NSError) in
                XCTFail()
            })

        dispatch_async(dispatch_get_main_queue()) {
            expectation.fulfill()
        }

        self.waitForExpectationsWithTimeout(1.0, handler: nil)
    }

    func testPropagateRejectionToChildPromises() {
        let expectation = self.expectationWithDescription("wait")

        let deferred = Promise<Int>.deferred()
        let error   = self.generateRandomError()

        deferred.promise
            .then({ (value) in

            })
