Created
October 26, 2019 05:35
-
-
Save victorpanitz/953b7f8e1212d636314c718e033f1b8a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func given<A>(_ description: String, block: () throws -> A) rethrows -> A { | |
return try XCTContext.runActivity(named: "Given " + description, block: { _ in try block() }) | |
} | |
func when<A>(_ description: String, block: () throws -> A) rethrows -> A { | |
return try XCTContext.runActivity(named: "When " + description, block: { _ in try block() }) | |
} | |
func then<A>(_ description: String, block: () throws -> A) rethrows -> A { | |
return try XCTContext.runActivity(named: "Then " + description, block: { _ in try block() }) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment