I'm using XCode 6.1, Swift and KIF for tests.
Is there any way (like processors) to define a let
value for debug and another specific to tests environment?
I'm using XCode 6.1, Swift and KIF for tests.
Is there any way (like processors) to define a let
value for debug and another specific to tests environment?
Swift allows for computed-properties at file-scope level, making the following possible:
var testIsRunning = false
var isDebugging: Bool
{
return testIsRunning ? false : true
}
You could set testIsRunning
to true
in your test-case's -setUp
method.