Skip to content
Browse files

Adding imports, fixing headers

  • Loading branch information...
1 parent cdfad33 commit 02b09c67a625066cb5a0a122f1dab3d7a77b347c @casademora casademora committed Jul 27, 2010
Showing with 28 additions and 1 deletion.
  1. +1 −0 NSDictionary+Shoulda.h
  2. +18 −0 NSDictionary+Shoulda.m
  3. +1 −1 NSObject+Shoulda.h
  4. +8 −0 ObjectiveShoulda.h
View
1 NSDictionary+Shoulda.h
@@ -12,5 +12,6 @@
@interface NSDictionary (Shoulda)
- (void) shouldBeEmpty;
+- (void) shouldNotBeEmpty;
@end
View
18 NSDictionary+Shoulda.m
@@ -10,4 +10,22 @@
@implementation NSDictionary (Shoulda)
+- (void) shouldBeEmpty
+{
+ [self runTestCase:(TestBlock)^{
+ return [[self allValues] count] == 0;
+ } withDescription:(ExpressionBlock)^{
+ return [NSString stringWithFormat:@"", self];
+ }];
+}
+
+- (void) shouldNotBeEmpty
+{
+ [self runTestCase:(TestBlock)^{
+ return [[self allValues] count] > 0;
+ } withDescription:(ExpressionBlock)^{
+ return [NSString stringWithFormat:@"", self];
+ }];
+}
+
@end
View
2 NSObject+Shoulda.h
@@ -27,7 +27,7 @@
- (void) shouldRespondToSelector:(SEL)expectedSelector withDescription:(NSString *)reason;
- (void) shouldNotRespondToSelector:(SEL)selector withDescription:(NSString *)reason;
-+ (void) shouldImplementProtocol:(Protocol *)expectedProtocol;
++ (void) shouldImplementProtocol:(Protocol *)expectedProtocol withDescription:(NSString *)reason;
@end
View
8 ObjectiveShoulda.h
@@ -9,6 +9,14 @@
//#import <Cocoa/Cocoa.h>
//#endif
#import "GHUnit.h"
+#import "NSSet+Shoulda.h"
+#import "NSArray+Shoulda.h"
+#import "NSDate+Shoulda.h"
+#import "NSDictionary+Shoulda.h"
+#import "NSManagedObject+Shoulda.h"
+#import "NSNumber+Shoulda.h"
+#import "NSObject+Shoulda.h"
+#import "NSString+Shoulda.h"
typedef BOOL (^TestBlock)();
typedef NSString* (^ExpressionBlock)();

0 comments on commit 02b09c6

Please sign in to comment.
Something went wrong with that request. Please try again.