Latest 1.0.0
Homepage https://github.com/azu/isUnitTesting
License MIT
Platforms ios 6.0, requires ARC
Authors

CI Status
Version
License
Platform

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

Installation

isUnitTesting is available through CocoaPods. To install
it, simply add the following line to your Podfile:

pod "isUnitTesting"

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;
}

That’s all!

Contributing

  1. Fork it!
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -am 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Submit a pull request :D

License

MIT

Latest podspec

{
    "name": "isUnitTesting",
    "version": "1.0.0",
    "summary": "You can find out if code is running inside a XCTest/OCUnit test or not?",
    "homepage": "https://github.com/azu/isUnitTesting",
    "license": "MIT",
    "authors": {
        "azu": "[email protected]"
    },
    "source": {
        "git": "https://github.com/azu/isUnitTesting.git",
        "tag": "1.0.0"
    },
    "social_media_url": "https://twitter.com/azu_re",
    "platforms": {
        "ios": "6.0"
    },
    "requires_arc": true,
    "source_files": "Pod/Classes"
}

Pin It on Pinterest

Share This