Skip to content

Instantly share code, notes, and snippets.

@olbrichj
Created July 25, 2017 20:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save olbrichj/02ee2a3802bea4a8a2844c2b5ba0b494 to your computer and use it in GitHub Desktop.
Save olbrichj/02ee2a3802bea4a8a2844c2b5ba0b494 to your computer and use it in GitHub Desktop.
#import <kiwi.h>
#import <SomeClass.h>
SPEC_BEGIN(SomeClass)
describe(@"The SomeClass", ^{
__block Someclass *sut;
beforeAll(^{
//Nothing to do here
});
context(@"After initialization", ^{
beforeEach(^{
//set up a fresh class
sut = [[SomeClass alloc] init];
});
it(@"should exist", ^{
//make sure it exist, because maybe someone disconnected an outlet (we all did it;))
[[sut shouldNot] beNil];
});
afterEach(^{
//specific tear down is due to ARC only necessary when something is executed
//and you don't know if it is still running
testClass = nil;
});
afterAll(^{
//Nothing to do here
});
});
});
SPEC_END
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment