hspec / hspec-wai

Helpers to test WAI applications with Hspec
MIT License
65 stars 25 forks source link

Hedgehog state machine #48

Open ajmcmiddlin opened 6 years ago

ajmcmiddlin commented 6 years ago

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.