Skip to content

Instantly share code, notes, and snippets.

@tovkal
Created August 19, 2017 17:44
Show Gist options
  • Save tovkal/5a99315246af0f42805b7958a7044354 to your computer and use it in GitHub Desktop.
Save tovkal/5a99315246af0f42805b7958a7044354 to your computer and use it in GitHub Desktop.
private func beInitial() -> Predicate<SearchTableViewController.State> {
return Predicate.define("be <initial>") { expression, message in
if let actual = try expression.evaluate(), case .initial = actual {
return PredicateResult(status: .matches, message: message)
}
return PredicateResult(status: .fail, message: message)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment