Hedgehog integration
You can use sandwich-hedgehog
(provided as a separate package) to easily integrate integrate Hedgehog tests into the test tree.
Haddocks can be found here.
#
UsageTo use sandwich-hedgehog
, just add the package to your project. Then, introduce a Hedgehog argument context using introduceHedgehog. Now you can start writing props as test nodes using the prop function. For example:
#
Modifying the parametersIf you use introduceHedgehog', you can pass your own value for the HedgehogParams.
If you want to modify the already-introduced arguments in a test tree, we provide the modifyArgs function, as well as helpers like modifySeed
, modifySize
, etc. These are modelled directly after HSpec's Test.Hspec.Hedgehog.
#
Controlling Hedgehog parameters with command line argsIf you use the introduceHedgehogCommandLineOptions family of functions, then some Hedgehog parameters can be controlled via the command line. To see the valid options, run Sandwich with --print-hedgehog-flags
.
#
DemoA demo is provided in the Sandwich repo.