Note to readers: Bear with me. I promise there\'s a question.
I have a problem to solve and think to myself \"Oh, I\'ll do it in Ruby.\"
There's currently no one single way to set up a testsuite. Hopefully, people will standardize on cabal test
, which is out-of-the box. In fact, both HUnit
and QuickCheck
are also provided with the Haskell Platform, and so setting up tests doesn't require downloading any extra dependencies.
You're correct that an old accepted answer doesn't provide information on cabal test
. I edited it, and now it does! You're also probably correct that the linked page on the Haskell wiki (also written before cabal test
became available) doesn't provide information on current testing best practices. It's a wiki, and I encourage folks to edit it! Note that the page does, however, provide a link to another page that describes how one might structure a more complex Haskell project.
tldr; Use cabal test
. I'm fond of test-framework
, which you can integrate with cabal test
should you so desire. Sorry that cabal test
is sort of new and not all the resources we have (generally community editable) have been updated to point to it and describe how to use it. Updating lots of resources and creating tutorials is the job of a community. We should probably do a better job promoting lots of the new awesome tools introduced to the Haskell ecosystem in the last few years.