These are chat archives for etorreborre/specs2

24th
Jul 2017
Matthew de Detrich
@mdedetrich
Jul 24 2017 12:50

Is there a reason why the following works

Right(1) must beRight.like { case i => i must be_>(0) }

and not

Future.successful(Right(1)) must beRight.like { case i => i must be_>(0) }
And I do have a (implicit ec: ExecutionEnv) in scope
Do I need a special compiler flag or something?
Fabio Labella
@SystemFw
Jul 24 2017 13:09
I wouldn't expect something that works on Either to necessarily work for Future[Either], have you trait "lifting" the matcher with await or something like that?
Eric Torreborre
@etorreborre
Jul 24 2017 13:14
Future.successful(Right(1)) must beRight.like { case i => i must be_>(0) }.await should work
Fabio Labella
@SystemFw
Jul 24 2017 13:15
:+1:
Fabio Labella
@SystemFw
Jul 24 2017 13:28
s/trait/tried lol