Skip to content

Instantly share code, notes, and snippets.

@swizzlr
Created September 2, 2015 14:40
Show Gist options
  • Select an option

  • Save swizzlr/2bafcd83ad8583a97c24 to your computer and use it in GitHub Desktop.

Select an option

Save swizzlr/2bafcd83ad8583a97c24 to your computer and use it in GitHub Desktop.

Revisions

  1. swizzlr created this gist Sep 2, 2015.
    9 changes: 9 additions & 0 deletions TestRealm.swift
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,9 @@
    // 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