 }
 
 class AlamofireRequestDebugDescriptionTestCase: XCTestCase {
-    private func cURLCommandComponents(request: Request) -> [String] {
-        return request.debugDescription.componentsSeparatedByCharactersInSet(NSCharacterSet.whitespaceAndNewlineCharacterSet()).filter { $0 != "" && $0 != "\\" }
+    let manager = Alamofire.Manager(configuration: NSURLSessionConfiguration.defaultSessionConfiguration())
+
+    // MARK: -
+
+    override func setUp() {
+        manager.startRequestsImmediately = false
+
+        if let cookieStorage = manager.session.configuration.HTTPCookieStorage {
+            for cookie in cookieStorage.cookies ?? [] {
+                cookieStorage.deleteCookie(cookie as NSHTTPCookie)
+            }
+        }
     }
 
     // MARK: -
 
     func testGETRequestDebugDescription() {
         let URL = "http://httpbin.org/get"
-        let request = Alamofire.request(.GET, URL)
+        let request = manager.request(.GET, URL)
         let components = cURLCommandComponents(request)
 
         XCTAssert(components[0..<3] == ["$", "curl", "-i"], "components should be equal")

        XCTAssert(components[5..<7] == ["-b", "\"foo=bar\""], "command should contain -b flag")
        XCTAssert(components.last! == "\"\(URL)\"", "URL component should be equal")
    }
}


    func testPOSTRequestWithJSONParametersDebugDescription() {
        let URL = "http://httpbin.org/post"
        let request = manager.request(.POST, URL, parameters: ["foo": "bar"], encoding: .JSON)
        let components = cURLCommandComponents(request)

        XCTAssert(components[0..<3] == ["$", "curl", "-i"], "components should be equal")
