Improve Stub Setup
q231950 opened this issue · 0 comments
q231950 commented
Currently it is a bit cumbersome to setup each test class to stub its requests:
override func setUp() {
app = XCUIApplication()
let processInfo = ProcessInfo()
app.launchEnvironment["STUB_PATH"] = "\(processInfo.environment["PROJECT_DIR"] ?? "")/stubs"
app.launchEnvironment["THE_STUBBORN_NETWORK_UI_TESTING"] = "YES"
app.launchEnvironment["STUB_NAME"] = self.name
app.launch()
}
This could be easier with a test observer and the test target's principal class.