Skip to content

Commit

Permalink
minTestsOk is minSuccessfulTests in ScalaCheck (etorreborre#752)
Browse files Browse the repository at this point in the history
Added comments to guide and code noting that specs2 uses minTestsOk to
refer to the ScalaCheck minSuccessfulTests parameter.
  • Loading branch information
jkleckner authored and etorreborre committed Jul 2, 2019
1 parent 823306f commit 8e11121
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions guide/src/test/scala/org/specs2/guide/UseScalaCheck.scala
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,8 @@ The parameters you can modify are:
`seed` | `None` | a Base64 encoded string which you can get from a previous failed run.
You can set the seed on the property directly with `setSeed(string)`

Note that `minTestsOk` in `specs2` corresponds to the `minSuccessfulTests` parameter in `ScalaCheck`.

#### Property level

It is also possible to specifically set the execution parameters on a given property: ${snippet{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ import org.scalacheck.rng.Seed

/**
* This class encapsulates ScalaCheck parameters + any additional parameters
*
* Note that minTestsOk in specs2 corresponds to the minSuccessfulTests parameter in ScalaCheck.
*/
case class Parameters(minTestsOk: Int = Test.Parameters.default.minSuccessfulTests,
minSize: Int = Test.Parameters.default.minSize,
Expand Down Expand Up @@ -59,4 +61,4 @@ object Parameters {
s"encoded string")
case ok => ok
}
}
}

0 comments on commit 8e11121

Please sign in to comment.