Skip to content

Hedgehog state machine - #48

Open
ajmcmiddlin wants to merge 4 commits into
hspec:mainfrom
ajmcmiddlin:hedgehog-sm
Open

Hedgehog state machine#48
ajmcmiddlin wants to merge 4 commits into
hspec:mainfrom
ajmcmiddlin:hedgehog-sm

Conversation

@ajmcmiddlin

Copy link
Copy Markdown

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