mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-04 05:26:48 +00:00
17 lines
476 B
Objective-C
17 lines
476 B
Objective-C
#import "BITTestHelper.h"
|
|
|
|
@implementation BITTestHelper
|
|
|
|
// loads test fixture from json file
|
|
// http://blog.roberthoglund.com/2010/12/ios-unit-testing-loading-bundle.html
|
|
+ (NSString *)jsonFixture:(NSString *)fixture {
|
|
NSString *path = [[NSBundle bundleForClass:self.class] pathForResource:fixture ofType:@"json"];
|
|
|
|
NSError *error = nil;
|
|
NSString *content = [NSString stringWithContentsOfFile:path encoding:NSUTF8StringEncoding error:&error];
|
|
|
|
return content;
|
|
}
|
|
|
|
@end
|