Skip to content
New issue

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

Hedgehog state machine #48

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

Conversation

ajmcmiddlin
Copy link

These were the changes I needed to make in order to use hspec-wai's testing combinators with hedgehog state machine testing. The important changes are:

  1. Add MonadCatch and MonadThrow instances for WaiSession, as these are required by executeSequential in hedgehog and already implemented for Session.
  2. Export runWaiSession from Test.Hspec.Wai so the WaiSession may be run once the test actions have been built.

I'm aware that runWaiSession can be imported from Test.Hspec.Wai.Internal, but given its importance I thought it made sense to make it part of the public API.

While using state machine testing from hedgehog, it's useful to build up a
session in a `PropertyT WaiSession` and then run the session at the end. In
order to do that access to `runWaiSession` is needed. It can currently be
accessed by importing the `Internal` module, but I think making it more
prominent is useful.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant