0

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?

Daniel Gomez Rico
  • 15,026
  • 20
  • 92
  • 162

1 Answers1

1

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.

Vatsal Manot
  • 17,695
  • 9
  • 44
  • 80