Created
January 7, 2019 18:05
-
-
Save regnerjr/fb38966a5bffec54084d508f5125ac1c to your computer and use it in GitHub Desktop.
For decoupled unit tests
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import UIKit | |
private func delegateClassName() -> String? { | |
guard NSClassFromString("TestBundleName.TestingAppDelegate") == nil else { | |
// when running fast tests, use a nil AppDelegate | |
return nil | |
} | |
return NSStringFromClass(AppDelegate.self) | |
} | |
_ = UIApplicationMain(CommandLine.argc, CommandLine.unsafeArgv, nil, delegateClassName()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment