mirror of
https://github.com/JohnEstropia/CoreStore.git
synced 2026-11-14 12:53:36 +01:00
WIP: Fetching unit tests
This commit is contained in:
1 parent
02a89accc8
commit
b98805e489
13 files changed
+1842
-74
No files matched your search
@@ -48,7 +48,9 @@ class BaseTestCase: XCTestCase {
|
||||
|
||||
try stack.addStorageAndWait(
|
||||
SQLiteStore(
|
||||
fileName: "\(self.dynamicType)_\($0).sqlite",
|
||||
fileURL: SQLiteStore.defaultRootDirectory
|
||||
.URLByAppendingPathComponent(NSUUID().UUIDString)
|
||||
.URLByAppendingPathComponent("\(self.dynamicType)_\(($0 ?? "-null-")).sqlite"),
|
||||
configuration: $0,
|
||||
localStorageOptions: .RecreateStoreOnModelMismatch
|
||||
)
|
||||
@@ -80,8 +82,8 @@ class BaseTestCase: XCTestCase {
|
||||
|
||||
// MARK: Private
|
||||
|
||||
private func deleteStores(directory: NSURL = SQLiteStore.defaultRootDirectory) {
|
||||
private func deleteStores() {
|
||||
|
||||
_ = try? NSFileManager.defaultManager().removeItemAtURL(directory)
|
||||
_ = try? NSFileManager.defaultManager().removeItemAtURL(SQLiteStore.defaultRootDirectory)
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user