Skip to content

Instantly share code, notes, and snippets.

@concertman
Last active September 22, 2015 15:44
Show Gist options
  • Save concertman/084ba933dbd08d4d8d1e to your computer and use it in GitHub Desktop.
Save concertman/084ba933dbd08d4d8d1e to your computer and use it in GitHub Desktop.
assert
import XCTest
class USTAssert: XCTestCase {
func assertExistsWithWait(wait: NSTimeInterval, evaluatedWithObject object: AnyObject) -> XCTestExpectation {
let predicate = NSPredicate(format: "exists == true", argumentArray: nil)
let result = self.expectationForPredicate(predicate, evaluatedWithObject: object, handler: nil)
waitForExpectationsWithTimeout(wait, handler: nil)
return result
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment