isUnitTesting 1.0.0

isUnitTesting 1.0.0

TestsTested
LangLanguage Obj-CObjective C
License MIT
ReleasedLast Release Dec 2014

Maintained by azu.



You can find out if code is running inside a XCTest/OCUnit test or not?

Installation

Usage

This library provide a function for unit testing.

// @return YES if is running test
BOOL isUnitTesting()

You can use this following :

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
    if (isUnitTesting()) {
        return YES;
    }
    // Some initialize rootViewController
    return YES;
}

Author

azu, [email protected]

License

isUnitTesting is available under the MIT license. See the LICENSE file for more info.