trystan/hspec — Issue #42: Nice way to combine list specs monadic specs
Author: nh2
Created: 2011-12-10 21:31:32+00:00
State: open

I have an executable that runs all my specs, some of them written with hspec list descriptions, some of them written in the monadic style of Test.Hspec.Monadic.

Currently "concatenate them together" like this:

main = ListHspec.hspecX $ concat [
ModuleUsingListSpecs.specs
, runSpecM $ descriptions [
ModuleUsingMonadicSpecs.specs
]
]

However, I don't like this too much for two reasons:
- It uses runSpecM, which is commented as "internal only" in the hspec source
- I would prefer writing main in the monadic way, "importing" the ModuleUsingListSpecs.specs in a nice way.