A short & sweet generic expectation implementation in Swift
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
Expectations.xcodeproj
Expectations
ExpectationsTests
LICENSE
README.md

README.md

Expectations

A short & sweet expectation implementation written in Swift. See the blog post for the rationale behind it.

This is similar to using an XCTestExpectation.

Usage

Simply create an expectation, pass it to an asynchronous task and wait on it.

let expectation = Expectation()
someAsynchronousMethodCall() {
    expectation.fulfill()
}

expectation.wait(for: 5)

Installation

It's just a single file, copy it to your project and you're done.