mirror of
https://github.com/JohnEstropia/CoreStore.git
synced 2026-03-20 08:33:53 +01:00
Allow unit-testing in SPM builds
This commit is contained in:
@@ -28,6 +28,17 @@ import XCTest
|
||||
@testable
|
||||
import CoreStore
|
||||
|
||||
#if !SWIFT_PACKAGE
|
||||
|
||||
extension Bundle {
|
||||
|
||||
static var module: Bundle {
|
||||
return Bundle(for: BaseTestCase.self)
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
// MARK: - BaseTestCase
|
||||
|
||||
@@ -40,7 +51,7 @@ class BaseTestCase: XCTestCase {
|
||||
|
||||
let stack = DataStack(
|
||||
xcodeModelName: "Model",
|
||||
bundle: Bundle(for: Self.self)
|
||||
bundle: Bundle.module
|
||||
)
|
||||
do {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user