Skip to content

Instantly share code, notes, and snippets.

@ennioma
Created July 6, 2017 21:58
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save ennioma/64d062209911429eae314a03f76dbef1 to your computer and use it in GitHub Desktop.
class DummyContext: StorageContext {
required init(configuration: ConfigurationType = .basic(url: nil)) throws {}
// ...
func fetch<T: Storable>(_ model: T.Type, predicate: NSPredicate? = nil, sorted: Sorted? = nil, completion: (([T]) -> ())) {
let t = Object() as! T
completion([t, t, t, t])
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment