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
  • 13,991
  • 15
  • 88
  • 150

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
  • 16,824
  • 8
  • 42
  • 78