     }
 
     func verifyMedicationData(data: NSData) {
-        if let json = NSString(data: data, encoding:NSUTF8StringEncoding) {
+        if let json = NSString(data: data, encoding: NSUTF8StringEncoding) {
             XCTAssertNotNil(json)
             let expectedString = "{\n    \"medications\": [{\n        \"id\": 99,\n        \"profile_id\": 260,\n        \"name\": \"Prozac\",\n        \"details\": null,\n        \"frequency\": \"daily\",\n        \"dosage\": \"200 mg\",\n        \"notify\": false,\n        \"medication_times\": [ {\n            \"time\": \"1980-06-20T09:30:00.000Z\"\n        }]\n    }]\n}"
             XCTAssertEqual(expectedString, json)

        let request = NSMutableURLRequest(URL: requestURL)
        request.HTTPMethod = "POST"

        let e = expectationWithDescription("...")

        NSURLSession.sharedSession().dataTaskWithRequest(request, completionHandler: { [weak self] (data, response, error) -> Void in
            guard let weakSelf = self else { return }

            e.fulfill()
            if let data = data {
                XCTAssertNotNil(data)
                weakSelf.verifySignUpData(data)
            } else {
                XCTFail("No data returned.")
            }
            XCTAssertNil(error)
        }).resume()


import OHHTTPStubs

class HTTPStubberTests: XCTestCase {
    override func setUp() {
        super.setUp()
    }
