{"action":"created","issue":{"url":"https://api.github.com/repos/Quick/Quick/issues/273","labels_url":"https://api.github.com/repos/Quick/Quick/issues/273/labels{/name}","comments_url":"https://api.github.com/repos/Quick/Quick/issues/273/comments","events_url":"https://api.github.com/repos/Quick/Quick/issues/273/events","html_url":"https://github.com/Quick/Quick/issues/273","id":64303200,"number":273,"title":"Trouble testing a watchkit extension","user":{"login":"treybean","id":1118,"avatar_url":"https://avatars.githubusercontent.com/u/1118?v=3","gravatar_id":"","url":"https://api.github.com/users/treybean","html_url":"https://github.com/treybean","followers_url":"https://api.github.com/users/treybean/followers","following_url":"https://api.github.com/users/treybean/following{/other_user}","gists_url":"https://api.github.com/users/treybean/gists{/gist_id}","starred_url":"https://api.github.com/users/treybean/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/treybean/subscriptions","organizations_url":"https://api.github.com/users/treybean/orgs","repos_url":"https://api.github.com/users/treybean/repos","events_url":"https://api.github.com/users/treybean/events{/privacy}","received_events_url":"https://api.github.com/users/treybean/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-03-25T15:47:27Z","updated_at":"2015-04-02T01:46:39Z","closed_at":"2015-04-01T22:08:02Z","body":"We use Quick + Nimble on our main app. We just added a WatchKit target, though, and are having trouble getting access to the extension's classes to test. We follow the recommendation to not make our app's classes part of the MyAppTests target (and import the app's module) and plan to do the same for testing the watchkit extension. Right now, with a pretty unmodified watchkit target, we added a new spec class to the MyAppTests target, InterfaceControllerSpecs.swift\r\n\r\n```swift\r\nimport MyApp_WatchKit_Extension\r\nimport Quick\r\nimport Nimble\r\n\r\nclass InterfaceControllerSpecs: QuickSpec {\r\n    override func spec() {\r\n        fit(\"should work\") {\r\n            var interfaceController = InterfaceController()\r\n            expect(interfaceController.description).toNot(beNil())\r\n        }\r\n    }\r\n}\r\n```\r\n\r\nAs you can see, pretty basic. :) This won't compile, though. I get the following build error:\r\n\r\n* Apple Mach-O Linker Error\r\n  \r\n  Undefined symbols for architecture x86_64:\r\n  \"__TFC26MyApp_WatchKit_Extension19InterfaceControllerCfMS0_FT_S0_\", referenced from:\r\n      __TFFC12MyAppTests24InterfaceControllerSpecs4specFS0_FT_T_U_FT_T_ in InterfaceControllerSpecs.o\r\n  \"__TMaC26MyApp_WatchKit_Extension19InterfaceController\", referenced from:\r\n      __TFFC12MyAppTests24InterfaceControllerSpecs4specFS0_FT_T_U_FT_T_ in InterfaceControllerSpecs.o\r\nld: symbol(s) not found for architecture x86_64\r\nclang: error: linker command failed with exit code 1 (use -v to see invocation)\r\n\r\nWhen I comment out the ``` var interfaceController = InterfaceController()``` line, it compiles fine. Am I doing something stupid here or is there a different way to test watchkit extensions? Does Quick support that?"},"comment":{"url":"https://api.github.com/repos/Quick/Quick/issues/comments/88686477","html_url":"https://github.com/Quick/Quick/issues/273#issuecomment-88686477","issue_url":"https://api.github.com/repos/Quick/Quick/issues/273","id":88686477,"user":{"login":"treybean","id":1118,"avatar_url":"https://avatars.githubusercontent.com/u/1118?v=3","gravatar_id":"","url":"https://api.github.com/users/treybean","html_url":"https://github.com/treybean","followers_url":"https://api.github.com/users/treybean/followers","following_url":"https://api.github.com/users/treybean/following{/other_user}","gists_url":"https://api.github.com/users/treybean/gists{/gist_id}","starred_url":"https://api.github.com/users/treybean/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/treybean/subscriptions","organizations_url":"https://api.github.com/users/treybean/orgs","repos_url":"https://api.github.com/users/treybean/repos","events_url":"https://api.github.com/users/treybean/events{/privacy}","received_events_url":"https://api.github.com/users/treybean/received_events","type":"User","site_admin":false},"created_at":"2015-04-02T01:46:39Z","updated_at":"2015-04-02T01:46:39Z","body":"Now worries! Makes sense. I figured this was the case, but wanted to make sure I wasn't missing something. Thanks for the confirmation and tips on where to go from here!"}}