scalacheck-effect icon indicating copy to clipboard operation
scalacheck-effect copied to clipboard

Support scalatest mixins

Open Daenyth opened this issue 5 years ago • 4 comments

To help this be a better drop-in upgrade from scalatest-scalacheck, it would help to have mixins that provide forAll helpers in the style of ScalaCheckPropertyChecks

Daenyth avatar Sep 30 '20 14:09 Daenyth

I personally prefer the mixin style but didn't want scalacheck-effect to diverge from the syntax used by munit-scalacheck. If there was a mixin trait in munit-scalacheck that provided the various forAll definitions, I'd have no problem adding a similar forAllF mixin to this project.

mpilquist avatar Nov 17 '20 13:11 mpilquist

If it was restricted to a scalacheck-effect-scalatest package, would that help?

Daenyth avatar Nov 17 '20 13:11 Daenyth

I don't think so, as we'd still have the same disparity between forAll and forAllF. Given that ScalaTest doesn't support forAllF at all, I think what you're really after is a forAll mixin for vanilla Prop values.

Note source compatibility is generally just an import away -- import org.scalacheck.Prop.forAll

mpilquist avatar Nov 17 '20 13:11 mpilquist

i've been looking into how to use scalacheck in scalatest for properties that return an effect, i came across https://gist.github.com/mpilquist/7dd30a44ca2a7fe0cd494d9b04e4f661#file-eff-scala from yourself @mpilquist

is that not what we're after in this issue?

lacarvalho91 avatar Jun 28 '23 15:06 lacarvalho91