I have code similar to the below snippet
class MainViewController: UIViewController {
private var bLogin = true
}
From XCTest file, how can I access "bLogin" variable?
Thanks
If you are using Swift 2.0 add @testable to the import statement:
@testable import MyMainModule
private to internal. There isn't a good way to test private methods in Swift 1.2