These are chat archives for etorreborre/specs2

Jul 2016
Edmondo Porcu
Jul 03 2016 10:00
Hello folks! What's the right way to perform calls that might through exception inside matchers? I typically have to perform a wait on a future that might be failed
and I would like that failure to become a matching failure
Eric Torreborre
Jul 03 2016 10:54
@dwijnand you could easily add a post-processing trait to do this. I will try to prototype this for you when I have some time
Dale Wijnand
Jul 03 2016 10:55
cool, thanks
Dale Wijnand
Jul 03 2016 11:09
This is hurting my brain, but I think the combination of typecheck/must failWith/pendingUntilFixed doesn't work: I made it start failing typechecking and it didn't break the test :-/
Eric Torreborre
Jul 03 2016 11:24
@dwijnand quickly before I leave
import org.specs2.Specification
import org.specs2.ScalaCheck
import org.specs2.specification.core._

class TestSpec extends Specification with ScalaCheck with CommentsProcessor { def is = s2"""

  // This is a comment

  This is some text

  And an example $e1


  def e1 = {


trait CommentsProcessor extends Specification {
  override def map(fs: =>Fragments): Fragments = {
      case Fragment(Text(t), e, l) => Fragment(Text(removeComments(t)), e, l)
      case other => other

  def removeComments(t: String) =
@dwijnand can you please write an example of the combination of typecheck … I’ll try to make it work when I come back. Thanks
Dale Wijnand
Jul 03 2016 11:47
I found out what it was, I was testing for copy and ArgProperties is providing an implicit conversion from Any to a case class, which has copy
Maybe that should be opt-it, but meanwhile I can opt out
Thanks for the example.
Eric Torreborre
Jul 03 2016 12:55
I should definitely revisit this and use typeclasses. I was fairly ignorant of typeclasses at the time...
@edmondo1984 I think we could revisit the FutureMatchers to deal with the failure case. PR welcome!