Swift Test Tear Down Inspection for AppCode

Compatible with AppCode
Jun 18, 2018
Inspects test classes for properties that are not set to nil in the tear down method and offers to fix the problem by generating the tear down method.
  • Shows warning when properties are not set to nil in tear down.
  • Generates a tear down method if one does not exist.
  • Sets all optional and implicitly unwrapped optional properties to nil in the tear down.
  • Does not disturb existing code when modifying tear down method.
  • Automatically fix all test files using Code Cleanup.
  • Analyses methods called by the tear down for properties that are already set to nil.

Download plugin

Recent change notes

Fixes a breaking API change introduced in 2018.1.5 and 2018.2.

General usage instructions

With a Swift test file open, the class name will be highlighted with a warning if any properties are not set to nil in the tear down. Then ask AppCode to fix the problem for you:
  • Move the cursor to the class name
  • Press alt ↩ - Select 'Set properties to nil in tear down'