Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
25 lines (19 sloc) 783 Bytes
//
// InflectorTest.m
// ActiveSupportInflector
//
#import "NSString+ActiveSupportInflector.h"
@interface ActiveSupportInflectorTest : SenTestCase
@end
@implementation ActiveSupportInflectorTest
- (void)testPluralizationAndSingularization {
NSDictionary* dictionary = [NSDictionary dictionaryWithContentsOfFile:[[NSBundle bundleForClass:[self class]] pathForResource:@"ActiveSupportInflectorTest" ofType:@"plist"]];
NSArray* singularAndPlural = [dictionary objectForKey:@"singularAndPlural"];
for (NSArray* sAndP in singularAndPlural) {
NSString* singular = [sAndP objectAtIndex:0];
NSString* plural = [sAndP objectAtIndex:1];
assertThat(plural, equalTo([singular pluralizeString]));
assertThat(singular, equalTo([plural singularizeString]));
}
}
@end
Something went wrong with that request. Please try again.