Advertisement
Guest User

Untitled

a guest
Jul 25th, 2017
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.79 KB | None | 0 0
  1. #import <kiwi.h>
  2. #import <SomeClass.h>
  3.  
  4. SPEC_BEGIN(SomeClass)
  5.  
  6. describe(@"The SomeClass", ^{
  7. __block Someclass *sut;
  8. beforeAll(^{
  9. //Nothing to do here
  10. });
  11.  
  12. context(@"After initialization", ^{
  13. beforeEach(^{
  14. //set up a fresh class
  15. sut = [[SomeClass alloc] init];
  16. });
  17.  
  18. it(@"should exist", ^{
  19. //make sure it exist, because maybe someone disconnected an outlet (we all did it;))
  20. [[sut shouldNot] beNil];
  21. });
  22. afterEach(^{
  23. //specific tear down is due to ARC only necessary when something is executed
  24. //and you don't know if it is still running
  25. testClass = nil;
  26. });
  27.  
  28. afterAll(^{
  29. //Nothing to do here
  30. });
  31. });
  32. });
  33.  
  34. SPEC_END
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement