     func testPropagatesErrorsInTheFuture() {
         stubRequest("GET", anyUrl).andFailWithError(anyError)
         let httpClient = AlamofireHttpClient()
+        let getRequest = givenOneHttpRequest(.GET, url: anyUrl)
 
         var error: NSError = NSError(domain: "", code: 0, userInfo: nil)
-        let getRequest = givenOneHttpRequest(.GET, url: anyUrl)
         httpClient.send(getRequest).onFailure { httpError in
             error = httpError
         }

    func testReceivesHttpStatusCodeInTheHttpResponse() {
        stubRequest("GET", anyUrl).andReturn(anyStatusCode)
        let httpClient = AlamofireHttpClient()

        var statusCode = 0
        let getRequest = givenOneHttpRequest(.GET, url: anyUrl)
        httpClient.send(getRequest).onSuccess { httpResponse in
            statusCode = httpResponse.statusCode
        }

        httpClient.send(getRequest)

        expect(statusCode).toEventually(equal(anyStatusCode))
    }

    func testSendsParamsConfiguredInTheHttpRequest() {
        stubRequest("GET", "http://www.any.com/?key=value")
        let httpClient = AlamofireHttpClient()
        let getRequest = givenOneHttpRequest(.GET, url: "http://www.any.com/", params: ["key" : "value"])

        var requestFinished = false
        httpClient.send(getRequest).onSuccess { httpResponse in
            requestFinished = true
        }
