Raise an exception if the fixture fails to parse rather than returning nil

This commit is contained in:
Blake Watters
2012-09-27 17:05:25 -04:00
parent 47965f361c
commit 6c463bfb6b

View File

@@ -66,7 +66,9 @@ static NSBundle *fixtureBundle = nil;
+ (id)parsedObjectWithContentsOfFixture:(NSString *)fixtureName
{
return [[self fixtureBundle] parsedObjectWithContentsOfResource:fixtureName withExtension:nil];
id fixtureObject = [[self fixtureBundle] parsedObjectWithContentsOfResource:fixtureName withExtension:nil];
NSAssert(fixtureObject, @"Failed to parse contents of fixture at path '%@'", fixtureName);
return fixtureObject;
}
@end