Skip to content

Instantly share code, notes, and snippets.

@wasnotrice
Last active August 29, 2015 14:18
Show Gist options
  • Select an option

  • Save wasnotrice/2bcb6ab2dcde4a8b8967 to your computer and use it in GitHub Desktop.

Select an option

Save wasnotrice/2bcb6ab2dcde4a8b8967 to your computer and use it in GitHub Desktop.
Specta failure
2015-04-02 12:16:54.687 app[70329:16811816] [before] AVYPhotoEditorCustomization conforms to protocol: NO
2015-04-02 12:16:54.687 app[70329:16811816] Added exclude protocol
2015-04-02 12:16:54.688 app[70329:16811816] [after] AVYPhotoEditorCustomization conforms to protocol: YES
...
2015-04-02 12:16:55.742 app[70329:16811816] *** Terminating app due to uncaught exception 'AVYInvalidResourceBundle', reason: 'Unable to locate AviarySDKResource.bundle'
*** First throw call stack:
(
0 CoreFoundation 0x000000010780ff35 __exceptionPreprocess + 165
1 libobjc.A.dylib 0x0000000106915bb7 objc_exception_throw + 45
2 CoreFoundation 0x000000010780fe6d +[NSException raise:format:] + 205
3 libdispatch.dylib 0x000000010837aaf4 _dispatch_client_callout + 8
4 libdispatch.dylib 0x0000000108368e72 dispatch_once_f + 129
5 app 0x0000000102821657 AVYSDKResourceBundle + 312
6 appTests 0x00000001135afaa5 +[AVYPhotoEditorCustomization initialize] + 53
7 libobjc.A.dylib 0x00000001069164d6 _class_initialize + 648
8 libobjc.A.dylib 0x000000010691f6e1 lookUpImpOrForward + 351
9 libobjc.A.dylib 0x000000010692c0d3 objc_msgSend + 211
10 libobjc.A.dylib 0x0000000106914599 _class_resolveMethod + 124
11 libobjc.A.dylib 0x000000010691f707 lookUpImpOrForward + 389
12 libobjc.A.dylib 0x000000010691f45f class_getInstanceMethod + 60
13 appTests 0x00000001132aa7b5 ClassesWithClassMethod + 245
14 appTests 0x00000001132aa69c __44-[SPTExampleGroup runGlobalBeforeEachHooks:]_block_invoke + 28
15 libdispatch.dylib 0x000000010837aaf4 _dispatch_client_callout + 8
16 libdispatch.dylib 0x0000000108368e72 dispatch_once_f + 129
17 appTests 0x00000001132aa46f -[SPTExampleGroup runGlobalBeforeEachHooks:] + 159
18 appTests 0x00000001132ab33f -[SPTExampleGroup runBeforeEachHooks:] + 159
19 appTests 0x00000001132aacf6 -[SPTExampleGroup runBeforeHooks:] + 118
20 appTests 0x00000001132ad0a6 __44-[SPTExampleGroup compileExamplesWithStack:]_block_invoke136 + 166
21 appTests 0x00000001132af9bb -[SPTSpec spt_runExample:] + 347
22 appTests 0x00000001132af46d __35+[SPTSpec spt_convertToTestMethod:]_block_invoke + 93
23 CoreFoundation 0x0000000107707c8c __invoking___ + 140
24 CoreFoundation 0x0000000107707ae2 -[NSInvocation invoke] + 290
25 XCTest 0x00000001141bc0f7 -[XCTestCase invokeTest] + 253
26 XCTest 0x00000001141bc2f8 -[XCTestCase performTest:] + 150
27 appTests 0x00000001132b05e9 -[SPTSpec performTest:] + 137
28 XCTest 0x00000001141c5bf5 -[XCTest run] + 260
29 XCTest 0x00000001141baffb -[XCTestSuite performTest:] + 379
30 XCTest 0x00000001141c5bf5 -[XCTest run] + 260
31 XCTest 0x00000001141baffb -[XCTestSuite performTest:] + 379
32 XCTest 0x00000001141c5bf5 -[XCTest run] + 260
33 XCTest 0x00000001141baffb -[XCTestSuite performTest:] + 379
34 XCTest 0x00000001141c5bf5 -[XCTest run] + 260
35 XCTest 0x00000001141b80bc __25-[XCTestDriver _runSuite]_block_invoke + 56
36 XCTest 0x00000001141c2ead -[XCTestObservationCenter _observeTestExecutionForBlock:] + 162
37 XCTest 0x00000001141b7ff0 -[XCTestDriver _runSuite] + 269
38 XCTest 0x00000001141b8a1d -[XCTestDriver _checkForTestManager] + 234
39 XCTest 0x00000001141c8af0 +[XCTestProbe runTests:] + 182
40 Foundation 0x00000001064ced55 __NSFireDelayedPerform + 387
41 CoreFoundation 0x0000000107777f64 __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ + 20
42 CoreFoundation 0x0000000107777b25 __CFRunLoopDoTimer + 1045
43 CoreFoundation 0x000000010773ae5d __CFRunLoopRun + 1901
44 CoreFoundation 0x000000010773a486 CFRunLoopRunSpecific + 470
45 GraphicsServices 0x0000000108f4c9f0 GSEventRunModal + 161
46 UIKit 0x00000001051be420 UIApplicationMain + 1282
47 app 0x0000000102674063 main + 115
48 libdyld.dylib 0x00000001083ab145 start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb)
#import "SpecHelper.h"
#import <objc/runtime.h>
@implementation SpecHelper
+ (void)load
{
[super load];
//Class klass = NSClassFromString(@"AVYPhotoEditorCustomization");
Class klass = objc_lookUpClass("AVYPhotoEditorCustomization");
Protocol *excludeProtocol = @protocol(SPTExcludeGlobalBeforeAfterEach);
NSLog(@"[before] AVYPhotoEditorCustomization conforms to protocol: %@", class_conformsToProtocol(klass, excludeProtocol) ? @"YES" : @"NO");
class_addProtocol(klass, excludeProtocol);
NSLog(@"Added exclude protocol");
NSLog(@"[after] AVYPhotoEditorCustomization conforms to protocol: %@", class_conformsToProtocol(klass, excludeProtocol) ? @"YES" : @"NO");
}
@end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment