a102f5cd7d
Building and testing the project via Xcode copies the resources into the testing bundle, which is not the case for SwiftPM. Hence the helper method, that tries loading the resource from the bundle first. If it is nil then the resource is loaded from the test module path directly.
18 lines
466 B
Objective-C
18 lines
466 B
Objective-C
//
|
|
// HTMLKitTestUtil.h
|
|
// HTMLKit
|
|
//
|
|
// Created by Iska on 11/04/16.
|
|
// Copyright © 2016 BrainCookie. All rights reserved.
|
|
//
|
|
|
|
#import <Foundation/Foundation.h>
|
|
|
|
@interface HTMLKitTestUtil : NSObject
|
|
|
|
+ (NSInvocation *)addTestToClass:(Class)cls withName:(NSString *)name block:(id)block;
|
|
+ (id)ivarForInstacne:(id)instance name:(NSString *)name;
|
|
+ (NSString *)pathForFixture:(NSString *)fixture ofType:(NSString *)type inDirectory:(NSString *)directory;
|
|
|
|
@end
|