Skip to content

Commit 393cf58

Browse files
committed
Update CoreDataMigrationTests
1 parent e2b433b commit 393cf58

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Sources/WordPressData/Swift/Bundle+WordPressData.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import Foundation
22

33
extension Bundle {
4-
public static var wordPressData: Bundle {
4+
@objc public class var wordPressData: Bundle {
55
Bundle(for: BundleToken.self)
66
}
77
}

Tests/KeystoneTests/Tests/CoreData/CoreDataMigrationTests.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -217,13 +217,13 @@ - (void)testMigrationFrom103To104CustomTransformers
217217
- (NSURL *)urlForModelName:(NSString*)modelName
218218
inDirectory:(NSString*)directory
219219
{
220-
NSBundle *bundle = [NSBundle mainBundle];
220+
NSBundle *bundle = [NSBundle wordPressData];
221221
NSURL *url = [bundle URLForResource:modelName
222222
withExtension:@"mom"
223223
subdirectory:directory];
224224
if (nil == url) {
225225
// Get mom file paths from momd directories.
226-
NSArray *momdPaths = [[NSBundle mainBundle] pathsForResourcesOfType:@"momd"
226+
NSArray *momdPaths = [[NSBundle wordPressData] pathsForResourcesOfType:@"momd"
227227
inDirectory:directory];
228228
for (NSString *momdPath in momdPaths) {
229229
url = [bundle URLForResource:modelName

0 commit comments

Comments
 (0)