New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
specs2 should take Future[MatchResult[T]] #241
Comments
Done. This should be now as simple as (in 2.4-SNAPSHOT): Future(1 must_== 1).await
Future(1 must_== 1).await(retries = 2, timeout = 1.second) |
Wow that was fast. Thanks! |
so it's import org.specs2.time.NoTimeConversions
class _Spec extends Specification with NoTimeConversions { I think it's better if you accept a specs2 duration and convert it internally. also I think it's better if you let the user define the execution context
specs2 trait ConcurrentContext {
implicit val context: ExecutionContext
}
trait FutureMatchers extends Expectations { context: ConcurrentContext =>
// ...
} user class _Spec extends Specification with ConcurrentContext{
implicit lazy val context = ???
} so he could use
|
That's a very good suggestion and I added a trait to hold the execution context. On the |
Thanks, Looking good :) |
when you have a
Matcher[Future[T]]
we can useawait
, but when we have aFuture[MatchResult[T]]
I think specs2 could handle it.The text was updated successfully, but these errors were encountered: