Skip to content

Instantly share code, notes, and snippets.

@swizzlr
Created September 2, 2015 14:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save swizzlr/2bafcd83ad8583a97c24 to your computer and use it in GitHub Desktop.
Save swizzlr/2bafcd83ad8583a97c24 to your computer and use it in GitHub Desktop.
Isolate those realms
// Creates a new in memory realm for testing
internal func NewTestRealm() -> Realm {
let idString = NSUUID().UUIDString
let config = Realm.Configuration(inMemoryIdentifier: idString)
return try! Realm(configuration: config)
}
import RealmSwift
import Foundation
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment