1
votes

Any Test class I create from the Tests Navigator (the plus (+) button on the left bottom), it add: #import <SenTestingKit/SenTestingKit.h> instead of XCTest.

  • This is my Xcode version: Version 6.1.1 (6A2008a)

Note: This is an existing project, old ones which I recently updated to use ARC instead of MRC, it is up and running and GHUnit (https://github.com/gh-unit/gh-unit) was working on it, I've removed GHUnit in order to use XCTest.

These are the steps:

  1. From the project navigator I click the + button to add a "New Test Class". enter image description here

  2. I set the Class name... enter image description here

  3. Set where the class will be saved... enter image description here

  4. The file is created, however instead of import XCTest it does import SenTestKit =( enter image description here

    • However it creates properly if I create the class using: File > New > File then select "Test Case Class" click "Next" set the class name, the screen is different, it show a "Subclass of" dropdown and XCTestCase is selected on it: enter image description here

    • Then the XCTest class is created properly: enter image description here

This what I did trying to solve the issue:

  • Did check if the test bundle "Wrapper Extension" was set to xctest (yeah it is)
  • Reinstalled my Xcode
  • Took the opportunity to upgrade to Yosemite =D

Did not solve the issue. This happens even if I create a new project :(

Any thoughts?

1

1 Answers

1
votes

I did contact Apple and looks likes this is a bug on XCode.

You can see the thread here: https://devforums.apple.com/message/1094651#1094651

Also, these steps can be used as an workaround:

File > New > File then select "Test Case Class" click "Next" set the class name.

The Test Class will be created properly.

I will post more details here once the Apple people update the bug I did report.