Permalink
Browse files

- Remove support for blocks alternative tests and remove KW_BLOCKS_EN…

…ABLED macro.
  • Loading branch information...
1 parent d6f2dd0 commit 9e776efbc354e60056eceb4cad25fd0e3c375217 Allen Ding committed Aug 23, 2011
@@ -10,7 +10,7 @@
#import "TestClasses.h"
#import "Kiwi.h"
-#if KW_TESTS_ENABLED && KW_BLOCKS_ENABLED
+#if KW_TESTS_ENABLED
SPEC_BEGIN(ExampleAsyncSpec)
@@ -92,4 +92,4 @@
SPEC_END
-#endif // #if KW_TESTS_ENABLED && KW_BLOCKS_ENABLED
+#endif // #if KW_TESTS_ENABLED
View
@@ -20,7 +20,7 @@
registerMatcher(haveFighters)
-#if KW_TESTS_ENABLED && KW_BLOCKS_ENABLED
+#if KW_TESTS_ENABLED
SPEC_BEGIN(ExampleSpec)
@@ -102,4 +102,4 @@
SPEC_END
-#endif // #if KW_TESTS_ENABLED && KW_BLOCKS_ENABLED
+#endif // #if KW_TESTS_ENABLED
@@ -127,8 +127,6 @@ - (void)itShouldVerifyRaisedExceptions {
[[subject should] raiseWithName:@"CruiserException" reason:@"-[Cruiser raise]" whenSent:@selector(raise)];
}
-#if KW_BLOCKS_ENABLED
-
- (void)itShouldVerifyBlockRaisedExceptions {
id subject = [Cruiser cruiser];
[[theBlock(^{ [subject raise]; }) should] raise];
@@ -140,8 +138,6 @@ - (void)itShouldVerifyBlockRaisedExceptions {
[[theBlock(^{ [foo objectAtIndex:0]; }) should] raiseWithName:NSRangeException];
}
-#endif // #if KW_BLOCKS_ENABLED
-
- (void)itShouldVerifyReceivedMessages {
id subject = [Cruiser cruiser];
[[subject should] receive:@selector(raiseShields) withCountAtLeast:1];
View
@@ -8,8 +8,6 @@
#import "KWBlockNode.h"
#import "KWExampleNode.h"
-#if KW_BLOCKS_ENABLED
-
@interface KWAfterAllNode : KWBlockNode<KWExampleNode>
#pragma mark -
@@ -18,5 +16,3 @@
+ (id)afterAllNodeWithCallSite:(KWCallSite *)aCallSite block:(KWVoidBlock)aBlock;
@end
-
-#endif // #if KW_BLOCKS_ENABLED
View
@@ -7,8 +7,6 @@
#import "KWAfterAllNode.h"
#import "KWExampleNodeVisitor.h"
-#if KW_BLOCKS_ENABLED
-
@implementation KWAfterAllNode
#pragma mark -
@@ -26,5 +24,3 @@ - (void)acceptExampleNodeVisitor:(id<KWExampleNodeVisitor>)aVisitor {
}
@end
-
-#endif // #if KW_BLOCKS_ENABLED
View
@@ -8,8 +8,6 @@
#import "KWBlockNode.h"
#import "KWExampleNode.h"
-#if KW_BLOCKS_ENABLED
-
@interface KWAfterEachNode : KWBlockNode<KWExampleNode>
#pragma mark -
@@ -18,5 +16,3 @@
+ (id)afterEachNodeWithCallSite:(KWCallSite *)aCallSite block:(KWVoidBlock)aBlock;
@end
-
-#endif // #if KW_BLOCKS_ENABLED
View
@@ -7,8 +7,6 @@
#import "KWAfterEachNode.h"
#import "KWExampleNodeVisitor.h"
-#if KW_BLOCKS_ENABLED
-
@implementation KWAfterEachNode
#pragma mark -
@@ -26,5 +24,3 @@ - (void)acceptExampleNodeVisitor:(id<KWExampleNodeVisitor>)aVisitor {
}
@end
-
-#endif // #if KW_BLOCKS_ENABLED
View
@@ -8,8 +8,6 @@
#import "KWBlockNode.h"
#import "KWExampleNode.h"
-#if KW_BLOCKS_ENABLED
-
@interface KWBeforeAllNode : KWBlockNode<KWExampleNode>
#pragma mark -
@@ -18,5 +16,3 @@
+ (id)beforeAllNodeWithCallSite:(KWCallSite *)aCallSite block:(KWVoidBlock)aBlock;
@end
-
-#endif // #if KW_BLOCKS_ENABLED
View
@@ -7,8 +7,6 @@
#import "KWBeforeAllNode.h"
#import "KWExampleNodeVisitor.h"
-#if KW_BLOCKS_ENABLED
-
@implementation KWBeforeAllNode
#pragma mark -
@@ -26,5 +24,3 @@ - (void)acceptExampleNodeVisitor:(id<KWExampleNodeVisitor>)aVisitor {
}
@end
-
-#endif // #if KW_BLOCKS_ENABLED
View
@@ -8,8 +8,6 @@
#import "KWBlockNode.h"
#import "KWExampleNode.h"
-#if KW_BLOCKS_ENABLED
-
@interface KWBeforeEachNode : KWBlockNode<KWExampleNode>
#pragma mark -
@@ -18,5 +16,3 @@
+ (id)beforeEachNodeWithCallSite:(KWCallSite *)aCallSite block:(KWVoidBlock)aBlock;
@end
-
-#endif // #if KW_BLOCKS_ENABLED
View
@@ -7,8 +7,6 @@
#import "KWBeforeEachNode.h"
#import "KWExampleNodeVisitor.h"
-#if KW_BLOCKS_ENABLED
-
@implementation KWBeforeEachNode
#pragma mark -
@@ -26,5 +24,3 @@ - (void)acceptExampleNodeVisitor:(id<KWExampleNodeVisitor>)aVisitor {
}
@end
-
-#endif // #if KW_BLOCKS_ENABLED
View
@@ -6,8 +6,6 @@
#import "KiwiConfiguration.h"
-#if KW_BLOCKS_ENABLED
-
typedef void (^KWVoidBlock)(void);
@interface KWBlock : NSObject {
@@ -33,5 +31,3 @@ typedef void (^KWVoidBlock)(void);
KWBlock *theBlock(KWVoidBlock aBlock);
KWBlock *lambda(KWVoidBlock aBlock);
-
-#endif // #if KW_BLOCKS_ENABLED
View
@@ -6,8 +6,6 @@
#import "KWBlock.h"
-#if KW_BLOCKS_ENABLED
-
@interface KWBlock()
#pragma mark -
@@ -63,5 +61,3 @@ - (void)call {
KWBlock *lambda(KWVoidBlock aBlock) {
return [KWBlock blockWithBlock:aBlock];
}
-
-#endif // #if KW_BLOCKS_ENABLED
View
@@ -7,8 +7,6 @@
#import "KiwiConfiguration.h"
#import "KWBlock.h"
-#if KW_BLOCKS_ENABLED
-
@class KWCallSite;
@interface KWBlockNode : NSObject {
@@ -39,5 +37,3 @@
@property (nonatomic, readonly) KWVoidBlock block;
@end
-
-#endif // #if KW_BLOCKS_ENABLED
View
@@ -6,8 +6,6 @@
#import "KWBlockNode.h"
-#if KW_BLOCKS_ENABLED
-
@implementation KWBlockNode
#pragma mark -
@@ -51,5 +49,3 @@ - (void)dealloc {
@synthesize block;
@end
-
-#endif // #if KW_BLOCKS_ENABLED
@@ -7,8 +7,6 @@
#import "KiwiConfiguration.h"
#import "KWMatcher.h"
-#if KW_BLOCKS_ENABLED
-
@interface KWBlockRaiseMatcher : KWMatcher {
@private
NSException *exception;
@@ -24,5 +22,3 @@
- (void)raiseWithName:(NSString *)aName reason:(NSString *)aReason;
@end
-
-#endif // #if KW_BLOCKS_ENABLED
@@ -7,8 +7,6 @@
#import "KWBlockRaiseMatcher.h"
#import "KWBlock.h"
-#if KW_BLOCKS_ENABLED
-
@interface KWBlockRaiseMatcher()
#pragma mark -
@@ -121,5 +119,3 @@ - (void)raiseWithName:(NSString *)aName reason:(NSString *)aReason {
}
@end
-
-#endif // #if KW_BLOCKS_ENABLED
View
@@ -7,8 +7,6 @@
#import "KiwiConfiguration.h"
#import "KWExampleNode.h"
-#if KW_BLOCKS_ENABLED
-
@class KWAfterAllNode;
@class KWAfterEachNode;
@class KWBeforeAllNode;
@@ -67,5 +65,3 @@
- (void)acceptExampleNodeVisitor:(id<KWExampleNodeVisitor>)aVisitor;
@end
-
-#endif // #if KW_BLOCKS_ENABLED
View
@@ -7,8 +7,6 @@
#import "KWContextNode.h"
#import "KWExampleNodeVisitor.h"
-#if KW_BLOCKS_ENABLED
-
@implementation KWContextNode
#pragma mark -
@@ -101,5 +99,3 @@ - (void)acceptExampleNodeVisitor:(id<KWExampleNodeVisitor>)aVisitor {
}
@end
-
-#endif // #if KW_BLOCKS_ENABLED
View
@@ -7,8 +7,6 @@
#import "KiwiConfiguration.h"
#import "KWBlock.h"
-#if KW_BLOCKS_ENABLED
-
@class KWCallSite;
#pragma mark -
@@ -33,5 +31,3 @@ void beforeEachWithCallSite(KWCallSite *aCallSite, KWVoidBlock aBlock);
void afterEachWithCallSite(KWCallSite *aCallSite, KWVoidBlock aBlock);
void itWithCallSite(KWCallSite *aCallSite, NSString *aDescription, KWVoidBlock aBlock);
void pendingWithCallSite(KWCallSite *aCallSite, NSString *aDescription, KWVoidBlock ignoredBlock);
-
-#endif // #if KW_BLOCKS_ENABLED
View
@@ -7,8 +7,6 @@
#import "KWExampleGroup.h"
#import "KWExampleGroupBuilder.h"
-#if KW_BLOCKS_ENABLED
-
#pragma mark -
#pragma mark Building Example Groups
@@ -85,5 +83,3 @@ void itWithCallSite(KWCallSite *aCallSite, NSString *aDescription, KWVoidBlock a
void pendingWithCallSite(KWCallSite *aCallSite, NSString *aDescription, KWVoidBlock ignoredBlock) {
[[KWExampleGroupBuilder sharedExampleGroupBuilder] addPendingNodeWithCallSite:aCallSite description:aDescription];
}
-
-#endif // #if KW_BLOCKS_ENABLED
@@ -7,8 +7,6 @@
#import "KiwiConfiguration.h"
#import "KWBlock.h"
-#if KW_BLOCKS_ENABLED
-
@class KWCallSite;
@interface KWExampleGroupBuilder : NSObject {
@@ -40,5 +38,3 @@
- (void)addPendingNodeWithCallSite:(KWCallSite *)aCallSite description:(NSString *)aDescription;
@end
-
-#endif // #if KW_BLOCKS_ENABLED
@@ -14,8 +14,6 @@
#import "KWPendingNode.h"
#import "KWRegisterMatchersNode.h"
-#if KW_BLOCKS_ENABLED
-
@interface KWExampleGroupBuilder()
#pragma mark -
@@ -183,5 +181,3 @@ - (void)addPendingNodeWithCallSite:(KWCallSite *)aCallSite description:(NSString
}
@end
-
-#endif // #if KW_BLOCKS_ENABLED
View
@@ -6,8 +6,6 @@
#import "KiwiConfiguration.h"
-#if KW_BLOCKS_ENABLED
-
@protocol KWExampleNodeVisitor;
@protocol KWExampleNode<NSObject>
@@ -18,5 +16,3 @@
- (void)acceptExampleNodeVisitor:(id<KWExampleNodeVisitor>)aVisitor;
@end
-
-#endif
@@ -6,8 +6,6 @@
#import "KiwiConfiguration.h"
-#if KW_BLOCKS_ENABLED
-
@class KWAfterAllNode;
@class KWAfterEachNode;
@class KWBeforeAllNode;
@@ -32,5 +30,3 @@
- (void)visitPendingNode:(KWPendingNode *)aNode;
@end
-
-#endif // #if KW_BLOCKS_ENABLED
View
@@ -8,8 +8,6 @@
#import "KWBlockNode.h"
#import "KWExampleNode.h"
-#if KW_BLOCKS_ENABLED
-
@class KWPendingNode;
@interface KWItNode : KWBlockNode<KWExampleNode>
@@ -20,5 +18,3 @@
+ (id)itNodeWithCallSite:(KWCallSite *)aCallSite description:(NSString *)aDescription block:(KWVoidBlock)aBlock;
@end
-
-#endif // #if KW_BLOCKS_ENABLED
Oops, something went wrong.

0 comments on commit 9e776ef

Please sign in to comment.