Port a few test cases to Expecta syntax

This commit is contained in:
Blake Watters
2012-10-18 12:14:34 -04:00
parent fb6db948e1
commit 1f3f2646b5
2 changed files with 6 additions and 4 deletions

View File

@@ -34,7 +34,7 @@
withPrimaryKeyAttribute:mapping.primaryKeyAttribute
value:[NSNumber numberWithInt:123456]
inManagedObjectContext:managedObjectStore.persistentStoreManagedObjectContext];
assertThat(cachedObject, is(equalTo(reginald)));
expect(cachedObject).to.equal(reginald);
}
- (void)testFetchRequestMappingCacheReturnsObjectsWithStringPrimaryKey
@@ -54,7 +54,7 @@
withPrimaryKeyAttribute:mapping.primaryKeyAttribute
value:@"e-1234-a8-b12"
inManagedObjectContext:managedObjectStore.persistentStoreManagedObjectContext];
assertThat(cachedObject, is(equalTo(birthday)));
expect(cachedObject).to.equal(birthday);
}
@end

View File

@@ -19,7 +19,8 @@
{
RKSearchTokenizer *stringTokenizer = [RKSearchTokenizer new];
NSSet *tokens = [stringTokenizer tokenize:@"This is a test"];
assertThat(tokens, is(equalTo([NSSet setWithArray:@[ @"this", @"is", @"a", @"test" ]])));
NSSet *expectedTokens = [NSSet setWithArray:@[ @"this", @"is", @"a", @"test" ]];
expect(tokens).to.equal(expectedTokens);
}
- (void)testTokenizingStringWithStopWords
@@ -27,7 +28,8 @@
RKSearchTokenizer *stringTokenizer = [RKSearchTokenizer new];
stringTokenizer.stopWords = [NSSet setWithObjects:@"is", @"a", nil];
NSSet *tokens = [stringTokenizer tokenize:@"This is a test"];
assertThat(tokens, is(equalTo([NSSet setWithArray:@[ @"this", @"test" ]])));
NSSet *expectedTokens = [NSSet setWithArray:@[ @"this", @"test" ]];
expect(tokens).to.equal(expectedTokens);
}
@end