These are chat archives for etorreborre/specs2

Nov 2017
Nov 05 2017 18:37 UTC
@etorreborre Hi !
i'm trying to run similar examples on different data sets, and im inclined to use datatables, but is there any way to dynamically generate a data table?
Eric Torreborre
Nov 05 2017 21:23 UTC
Yes you definitely can with a fold left (list: List[(Int, Int, Int)]).foldLeft("a" | "b" | "a+b" |>) { case (res, (a, b, c)) => res | a ! b ! c } | { (a, b, c) => a+b === c }
I didn't try to compile it but this more or less should work
Nov 05 2017 21:29 UTC

@etorreborre Thanks for the quick response! another question while im at it - from reading the specs2 guide in understand that examples run in parallel. if I generate examples during runtime as such :

class MySpec extends mutable.Specification {
"this example has a lot of expectations" >> {
Result.foreach(1 to 1000) { i =>
i must_== i

will they run in parallel too?