     func testImediate() {
         let future = Future<Bool>()
         let expectation = expectationWithDescription("Imediate future failure")
-        future.failure(self.error)
+        future.failure(TestFailure.error)
         future.onSuccess {value in
             XCTAssert(false, "onSuccess called")
         }

            XCTAssertEqual(error.code, 100, "\(error)")
            expectation.fulfill()
        }
        promise.failure(self.error)
        waitForExpectationsWithTimeout(2) {error in
            XCTAssertNil(error, "\(error)")
        }
    }
    
}


import XCTest
import SimpleFutures

struct TestFailure {
    static let error = NSError(domain:"SimpleFutures", code:100, userInfo:[NSLocalizedDescriptionKey:"Testing"])
}

class FuturesSuccessTests: XCTestCase {
    
    override func setUp() {
