HMock icon indicating copy to clipboard operation
HMock copied to clipboard

HMock for plain old Haskell modules

Open cdsmith opened this issue 3 years ago • 0 comments

Migrated from TODO file.

It would be nice to use HMock to generate an implementation of an API in a plain Haskell module. The user would then select the appropriate implementation by using build-system tricks like backpack or CPP when compiling the system under test.

This requires a global set of expectations rather than tracking expectations in a monad wrapper. We'd also need a way to reset those global expectations before and after a test. They should also have a version number, so that stray threads from previous tests can just fail instead of making a mess in the current test.

cdsmith avatar Jun 30 '21 01:06 cdsmith