These are chat archives for etorreborre/specs2

Jul 2015
Eric Torreborre
Jul 28 2015 08:17
Sorry @dcsobral I didn’t get the notification from Gitter and I’m not checking out this room very often.
There are Task matchers and they are indeed not documented (I’ll fix that): They are available in the specs2-matcher-extra jar
@lucianenache you indeed need to have an ExecutionEnv but it’s easy to get: class MySpec(implicit ee: ExecutionEnv) extends Specification
the reason why you need it is that I want to be able to shutdown resources when the tests are over and avoid leaking threads.
@dcsobral if you want to negate a MatchResult you can use the negate method on it.
I’ll try to leave gitter open more often from now on...
Lucian Enache
Jul 28 2015 08:34
@etorreborre That's a nice optimization that you came up with, thanks for sharing :)
Daniel Capo Sobral
Jul 28 2015 08:39
@etorreborre It works mostly fine, but the “beEmpty” matcher failes.
It seems to be defined in terms of { def isEmpty: Boolean }, and that fails the value matcher for returnValue.
Eric Torreborre
Jul 28 2015 09:40
I'll have a look at that
Eric Torreborre
Jul 28 2015 10:49
@dcsobral can you give me an example of beEmpty.negate not working? This passes ok for me in an immutable spec:
val r = List(1) must beEmpty
Daniel Capo Sobral
Jul 28 2015 18:42
@etorreborre I meant the task matchers.
must returnValue(beEmpty) doesn’t work