tdd.md

September 24, 2017 ยท View on GitHub

TDD with Injection for Xcode (Swift only)

If you want to automatically run unit tests related to your injected file, integrate your project test target with InjectionTDD

You can either add to your test target compiled .framework or add pod to your Podfile:

...
  target 'TargetWithTests' do
    # Your test Pods

    pod 'InjectionTDD', '~> 0.4'
  end

Then, begin standard unit tests (โŒ˜+U). Then, everytime you inject new Swift file, Injection for Xcode automatically finds related unit tests, execute them and all results are presented in the standard Xcode interface:

tdd_demo

For more details, take a look on InjectionTDD.