We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
instance Example (a -> TestT IO ())
instance Example (a -> TestT IO ()) where type Arg (a -> TestT IO ()) = Gen a evaluateExample example = evaluateExample (\gen -> a <- forAll gen test (example a)
This puts the Gen into the hspec hooks.
Gen
hspec
beforeGen :: Gen a -> SpecWith (Gen a) -> Spec beforeGen gen = beforeAll (pure gen) beforeWithGen :: (a -> Gen b) -> SpecWith (Gen b) -> SpecWith (Gen a) beforeWithGen mkGen = beforeAllWith $ \genA -> pure (genA >>= mkGen)
But it also forbids you from providing "normal" values in to TestT. That's probably fine. After all you can always do pure :: a -> Gen a.
TestT
pure :: a -> Gen a
The text was updated successfully, but these errors were encountered:
instance (m ~ IO) => Example (PropertyT m a)
No branches or pull requests
This puts the
Gen
into thehspec
hooks.But it also forbids you from providing "normal" values in to
TestT
. That's probably fine. After all you can always dopure :: a -> Gen a
.The text was updated successfully, but these errors were encountered: