[Haskell-cafe] HSpec vs Doctest for TDD

Kazu Yamamoto (=?iso-2022-jp?B?GyRCOzNLXE9CSScbKEI=?=) kazu at iij.ad.jp
Fri Jun 27 00:23:32 UTC 2014

> I'm a huge fan of TDD (Test-Driven Development) et I used to use tools such
> as RSpec (Ruby). So naturally, I looked to HSpec, but it seems not
> idiomatic in Haskell.
> I have a bunch of questions:
> - Do you do TDD?
> - Which tools do you use?
> - Is doctest "better" (in some senses) than HSpec? Why?
> - Are HSpec and Doctest complementary? If so, in which case do you use one
> or another?
> - Is there some Haskell-specific good practices do to TDD?

Both doctest and HSpec are implemented by Simon (the same author). His
intention is described here:


Probably Haskell specific feature is QuickCheck integration. Now GHC
7.8 is out, we can use the "prop>" keyword in doctest cases, too.



More information about the Haskell-Cafe mailing list