Permalink
Find file
Fetching contributors…
Cannot retrieve contributors at this time
32 lines (26 sloc) 700 Bytes
//
// NSDictionary+Shoulda.m
// Freshpod
//
// Created by Saul Mora on 7/26/10.
// Copyright (c) 2010 Magical Panda Software LLC. All rights reserved.
//
#import "NSDictionary+Shoulda.h"
@implementation NSDictionary (Shoulda)
- (void) shouldBeEmpty
{
[self runTestCase:(TestBlock)^{
return [[self allValues] count] == 0;
} withDescription:(ExpressionBlock)^{
return [NSString stringWithFormat:@"%@ should be empty", self];
}];
}
- (void) shouldNotBeEmpty
{
[self runTestCase:(TestBlock)^{
return [[self allValues] count] > 0;
} withDescription:(ExpressionBlock)^{
return [NSString stringWithFormat:@"%@ should NOT be empty", self];
}];
}
@end