returnsFailureBy

infix fun <T> AnsweringScope<in Result<T>>.returnsFailureBy(function: () -> Throwable)

Function call returns Result.failure with exception provided each time by function.