[Haskell-cafe] HSpec vs Doctest for TDD
cma at bitemyapp.com
Tue Jun 24 21:24:24 UTC 2014
I don't have a problem with using TDD *and* type-safety to the full extent
of usefulness, but the lifecycle/process isn't what TDD experts would call
I do use HSpec, very happily. The author has done a truly excellent job
Process is something like:
write types, validate types
-> fill holes, validate terms against types
-> compose functions to see if results are sane, go back to 1st or 2nd step
-> Are there useful invariants QuickCheck can express? Write those first.
Repeat cycle as needed.
-> Decide on meaningful but compact functional/integration tests, repeat
cycle as needed.
Example HSpec tests (just functional/integration):
On Tue, Jun 24, 2014 at 3:55 PM, Gautier DI FOLCO <gautier.difolco at gmail.com
> Hi all,
> 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?
> Thanks in advance for your lights.
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Haskell-Cafe