Latest 1.1.0
Homepage https://github.com/maxgoedjen/MXGSynchronizeTest
License MIT
Frameworks XCTest
Authors

You should probably use XCTestExpectation if you’re using Xcode 6 or later instead of this.

Install with CocoaPods


target :MyAppTests, :exclusive => true do
    pod 'MXGSynchronizeTest'
end

Import into test

#import <MXGSynchronizeTest/XCTest+MXGSynchronizeTest.h>

Test

[XCTest mxg_synchronizeTest:^(BOOL *finished) {
    [MXGSomeService loadDataWithCompletion:^(id someObject, NSError *error) {
        XCTAssertNil(error, @"Error should be nil");
        XCTAssertNotNil(someObject, @"Response object should not be nil");
        *finished = YES;
    }];
}];

Latest podspec

{
    "name": "MXGSynchronizeTest",
    "version": "1.1.0",
    "summary": "Easily synchronize your async tests.",
    "description": "                   Trivially synchronizes asynchronous tests with a simple block interfacen",
    "homepage": "https://github.com/maxgoedjen/MXGSynchronizeTest",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Max Goedjen": "[email protected]"
    },
    "source": {
        "git": "https://github.com/maxgoedjen/MXGSynchronizeTest.git",
        "tag": "1.1.0"
    },
    "source_files": "*.{h,m}",
    "requires_arc": true,
    "frameworks": "XCTest",
    "xcconfig": {
        "FRAMEWORK_SEARCH_PATHS": ""$(PLATFORM_DIR)/Developer/Library/Frameworks""
    }
}

Pin It on Pinterest

Share This