Skip to content

Instantly share code, notes, and snippets.

View tonklon's full-sized avatar

Tobias Klonk tonklon

View GitHub Profile
@tonklon
tonklon / .gitignore
Last active December 30, 2015 02:49 — forked from adamgit/.gitignore
#########################
# .gitignore file for Xcode4 / OS X Source projects
#
# Version 2.0
# For latest version, see: http://stackoverflow.com/questions/49478/git-ignore-file-for-xcode-projects
#
# 2013 updates:
# - fixed the broken "save personal Schemes"
#
# NB: if you are storing "built" products, this WILL NOT WORK,
@tonklon
tonklon / someSpec.m
Last active December 20, 2015 03:08
Add this to your Kiwi Spec to capture call sites with it blocks. That enables improved location information for exceptions thrown during specs and unexpected messages received by mocks. These exceptions will then be reported with fullpath filename and line number, and that in turn allows Xcode to display in editor marks for this kind of errors.
typedef void(^KWItBlock)(NSString *aDescription, KWVoidBlock aBlock);
KWItBlock itWithAutoCallsite(KWCallSite *callSite) {
return ^(NSString *aDescription, KWVoidBlock aBlock) {
itWithCallSite(callSite, aDescription, aBlock);
};
}
#define it itWithAutoCallsite(KW_THIS_CALLSITE)