Last active
August 29, 2015 14:08
-
-
Save klaaspieter/03e4232c206ac8138e1c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class MockURLSession : NSURLSession { | |
var request: NSURLRequest? | |
override func dataTaskWithRequest(request: NSURLRequest, completionHandler: ((NSData!, NSURLResponse!, NSError!) -> Void)?) -> NSURLSessionDataTask { | |
self.request = request | |
return super.dataTaskWithRequest(request, completionHandler: completionHandler) | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Specs.MockURLSession dataTaskForRequest:completion:]: unrecognized selector sent to instance 0x7fc7e5907fb0" | |
( | |
0 CoreFoundation 0x00000001045d4f35 __exceptionPreprocess + 165 | |
1 libobjc.A.dylib 0x000000010426dbb7 objc_exception_throw + 45 | |
2 CoreFoundation 0x00000001045dc04d -[NSObject(NSObject) doesNotRecognizeSelector:] + 205 | |
3 CoreFoundation 0x000000010453427c ___forwarding___ + 988 | |
4 CoreFoundation 0x0000000104533e18 _CF_forwarding_prep_0 + 120 | |
5 Specs 0x0000000105da2e0b _TFC5Specs14MockURLSession19dataTaskWithRequestfS0_FTCSo12NSURLRequest17completionHandlerGSqFTGSQCSo6NSData_GSQCSo13NSURLResponse_GSQCSo7NSError__T___CSo20NSURLSessionDataTask + 1083 | |
6 Specs 0x0000000105da31d8 _TToFC5Specs14MockURLSession19dataTaskWithRequestfS0_FTCSo12NSURLRequest17completionHandlerGSqFTGSQCSo6NSData_GSQCSo13NSURLResponse_GSQCSo7NSError__T___CSo20NSURLSessionDataTask + 536 | |
7 Moses 0x0000000107dd154d _TFFC5Moses16URLRequestClient4postFS0_FTPS_20URLStringConvertible_10parametersGVSs10DictionarySSSS__PS_13OAuth2Request_U_FTFT_T_FT_T__T_ + 1549 | |
8 Moses 0x0000000107dcfb4b _TPA__TFFC5Moses16URLRequestClient4postFS0_FTPS_20URLStringConvertible_10parametersGVSs10DictionarySSSS__PS_13OAuth2Request_U_FTFT_T_FT_T__T_ + 123 | |
9 Moses 0x0000000107dcf0bf _TFC5Moses7RequestcfMS0_FT3urlPS_20URLStringConvertible_10parametersGVSs10DictionarySSSS_8resolverFTFT_T_FT_T__T__S0_ + 367 | |
10 Moses 0x0000000107dcf1a8 _TFC5Moses7RequestCfMS0_FT3urlPS_20URLStringConvertible_10parametersGVSs10DictionarySSSS_8resolverFTFT_T_FT_T__T__S0_ + 104 | |
11 Moses 0x0000000107dcf98f _TFC5Moses16URLRequestClient4postfS0_FTPS_20URLStringConvertible_10parametersGVSs10DictionarySSSS__PS_13OAuth2Request_ + 447 | |
12 Specs 0x0000000105da4419 _TFFC5Specs20URLRequestClientSpec4specFS0_FT_T_U_FT_T_ + 489 | |
13 Quick 0x0000000107d8f977 _TTRXFo__dT__XFdCb__dT__ + 39 | |
14 Quick 0x0000000107d8cf73 _TTRXFdCb__dT__XFo__dT__ + 19 | |
15 Quick 0x0000000107d92b68 _TFC5Quick7Example3runfS0_FT_T_ + 1480 | |
16 Quick 0x0000000107d93404 _TToFC5Quick7Example3runfS0_FT_T_ + 36 | |
17 Quick 0x0000000107d96a1c __41+[QuickSpec addInstanceMethodForExample:]_block_invoke + 92 | |
18 CoreFoundation 0x00000001044ccc8c __invoking___ + 140 | |
19 CoreFoundation 0x00000001044ccae2 -[NSInvocation invoke] + 290 | |
20 XCTest 0x0000000105dbe0f7 -[XCTestCase invokeTest] + 253 | |
21 XCTest 0x0000000105dbe2f8 -[XCTestCase performTest:] + 150 | |
22 XCTest 0x0000000105dc7bf5 -[XCTest run] + 260 | |
23 XCTest 0x0000000105dbcffb -[XCTestSuite performTest:] + 379 | |
24 XCTest 0x0000000105dc7bf5 -[XCTest run] + 260 | |
25 XCTest 0x0000000105dbcffb -[XCTestSuite performTest:] + 379 | |
26 XCTest 0x0000000105dc7bf5 -[XCTest run] + 260 | |
27 XCTest 0x0000000105dbcffb -[XCTestSuite performTest:] + 379 | |
28 XCTest 0x0000000105dc7bf5 -[XCTest run] + 260 | |
29 XCTest 0x0000000105dba0bc __25-[XCTestDriver _runSuite]_block_invoke + 56 | |
30 XCTest 0x0000000105dc4ead -[XCTestObservationCenter _observeTestExecutionForBlock:] + 162 | |
31 XCTest 0x0000000105db9ff0 -[XCTestDriver _runSuite] + 269 | |
32 XCTest 0x0000000105dbaa1d -[XCTestDriver _checkForTestManager] + 234 | |
33 XCTest 0x0000000105dcaaf0 +[XCTestProbe runTests:] + 182 | |
34 xctest 0x0000000103d5a196 xctest + 4502 | |
35 xctest 0x0000000103d5a40d xctest + 5133 | |
36 xctest 0x0000000103d59e13 xctest + 3603 | |
37 libdyld.dylib 0x0000000105893145 start + 1 | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Failure is at this line.