These are chat archives for etorreborre/specs2

15th
Sep 2015
Greg Pfeil
@sellout
Sep 15 2015 02:18
I’ve got a test, and I basically want something like if (setup) a must_== b else skipped("not supported on this platform"), but I’m not sure how to achieve that. (I’m still on 2.4, BTW)
Greg Pfeil
@sellout
Sep 15 2015 04:01
Currently I’m throwing a SkipException. But it seems like I should be able to return some form of skip as a result.
Matthew Pocock
@drdozer
Sep 15 2015 16:08
Hi - I'm resurrecting some old code that uses specs2 and scalacheck
Zainab Ali
@zainab-ali
Sep 15 2015 19:43
@adelbertc We've got the same issue as well etorreborre/specs2#414. Using 3.6.3 works or testOptions to add the arguments instead.
Adelbert Chang
@adelbertc
Sep 15 2015 19:43
@zainab-ali yep, eric suggested similar on the mailing list - thanks!
Eric Torreborre
@etorreborre
Sep 15 2015 22:34
@sellout you can write 1 must be_==(2).orSkip("skipped”) or 1 must be_==(1).when(condition)
@sellout you can also implement your own
  def skipIf[R : AsResult](condition: Boolean)(r: =>R): Result =
    if (condition) AsResult(r)
    else skipped