These are chat archives for etorreborre/specs2

6th
Sep 2016
Luca Molteni
@lucamolteni
Sep 06 2016 08:28
Hey guys, I'm using spec2 with play, but when I add the dependency of scala mock using "org.scalamock" %% "scalamock-specs2-support" % "3.2.2" % "test" I'm getting a could not find implicit value for evidence parameter of type org.specs2.execute.AsResult[org.specs2.concurrent.ExecutionEnv => org.specs2.execute.Result] in tests where, without the dependencies, work fine
Eric Torreborre
@etorreborre
Sep 06 2016 08:29
I'm not sure what this is but you should try to inject the ExecutionEnv as an implicit param for the whole spec instead of doing it example by example
class MySpec(implicit ee: ExecutionEnv) extends Specification
Luca Molteni
@lucamolteni
Sep 06 2016 08:30
Oh I see, I'm indeed injecting it in each spec
I don't remember where I've read it was equivalent... nvm though
Let me try modify the tests then, thanks
Luca Molteni
@lucamolteni
Sep 06 2016 08:37
Is this like a "best practice" or what
Eric Torreborre
@etorreborre
Sep 06 2016 08:38
It's a lot less verbose and it actually appeared a while after 3.x came out. So the early documentation was not mentioning it
Luca Molteni
@lucamolteni
Sep 06 2016 08:38
woah, I literally broke something '/home/luca/.ivy2/cache/org.specs2/specs2_2.11/jars/specs2_2.11-2.4.16.jar(org/specs2/specification/Action.class)' is broken
:D
hopefully it's only the cache
Eric Torreborre
@etorreborre
Sep 06 2016 08:38
Are you using 2.x or 3.x?
Luca Molteni
@lucamolteni
Sep 06 2016 08:39
3.6.6-scalaz-7.2.0
Eric Torreborre
@etorreborre
Sep 06 2016 08:39
so you shouldn't have any 2.4.x in sight
Luca Molteni
@lucamolteni
Sep 06 2016 08:39
I wonder who put the 2.4 jar there
yeah, you're correct
Eric Torreborre
@etorreborre
Sep 06 2016 08:39
maybe a dependency is pulling it for you
sbt dependencyGraph is your friend here
Luca Molteni
@lucamolteni
Sep 06 2016 08:40
Thanks I used that in the past, let me use it again
Luca Molteni
@lucamolteni
Sep 06 2016 08:46
it is scalamock...
[info]   +-org.scalamock:scalamock-specs2-support_2.11:3.2.2 [S]
[info]   | +-org.specs2:specs2_2.11:2.4.16 [S]
[info]   |   +-org.specs2:classycle:1.4.3
uhhm I should probably use another version of scalamock then
thanks a lot @etorreborre you were really useful
cheers!