A testing framework for Haskell with a friendly describe/it DSL
open sourceMITfree
Hspec is a testing framework for Haskell. It has a friendly DSL for defining tests with describe, it and expectations such as shouldBe, integrates with QuickCheck, SmallCheck and HUnit, runs spec items in parallel, and discovers test files automatically with hspec-discover. Its user's manual covers running individual spec items, speeding up the edit-compile-test cycle and writing custom formatters.
Problems it solves
- write readable unit tests for a Haskell project
- run Haskell property tests alongside example-based tests
- find and run all test files in a Haskell package automatically
Features
- A friendly DSL for defining tests with describe, it and expectations
- Integration with QuickCheck, SmallCheck and HUnit
- Parallel spec execution
- Automatic discovery of test files
- Running individual spec items
- Custom formatters
Alternatives
The same job
These do what Hspec does.
