jedesah
jedesah

Reputation: 3033

Is it possible to specify at the site of a Property definition how many times to execute the Property?

Such as this:

class MySpec extends Specification with ScalaCheck { def is = s2"""
  MyThing should
    do something the right way $x1
                                """
    def x1 = prop(4 /*times*/) { (...) =>
      ...
    }
  }
}

Upvotes: 1

Views: 55

Answers (1)

jedesah
jedesah

Reputation: 3033

Use setParameters and minTestsOk:

class MySpec extends Specification with ScalaCheck { def is = s2"""
  MyThing should
    do something the right way $x1
                                """
    def x1 = prop { (...) =>
      ...
    }.set(minTestsOk = 1)
  }
}

Upvotes: 1

Related Questions