hspec-discover: Automatically discover and run Hspec tests

[ library, mit, program, testing ] [ Propose Tags ]
This version is deprecated.

Say you have a driver module for your test suite.

module Main where

import Test.Hspec.Monadic

import qualified FooSpec
import qualified Foo.BarSpec
import qualified BazSpec

main :: IO ()
main = hspecX $ do
  describe "Foo"     FooSpec.spec
  describe "Foo.Bar" Foo.BarSpec.spec
  describe "Baz"     BazSpec.spec

Then you can replace it with the following.

{-# OPTIONS_GHC -F -pgmF hspec-discover #-}

All files with a name that ends in Spec.hs are include in the generated test suite. And it is assumed, that they export a spec of type Test.Hspec.Monadic.Specs.

Full documentation is here: https://github.com/sol/hspec-discover#readme

Modules

[Index]

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

  • No Candidates
Versions [RSS] 0.0.0, 0.0.1, 0.0.2, 0.0.3, 0.0.4, 0.0.5, 0.1.0, 0.1.0.1, 0.2.0, 2.0.0, 2.0.1, 2.0.2, 2.1.0, 2.1.1, 2.1.2, 2.1.3, 2.1.4, 2.1.5, 2.1.6, 2.1.7, 2.1.8, 2.1.9, 2.1.10, 2.2.0, 2.2.1, 2.2.2, 2.2.3, 2.2.4, 2.3.0, 2.3.1, 2.3.2, 2.4.0, 2.4.1, 2.4.2, 2.4.3, 2.4.4, 2.4.5, 2.4.6, 2.4.7, 2.4.8, 2.5.0, 2.5.1, 2.5.2, 2.5.3, 2.5.4, 2.5.5, 2.5.6, 2.5.7, 2.5.8, 2.5.9, 2.6.0, 2.6.1, 2.7.0, 2.7.1, 2.7.2, 2.7.3, 2.7.4, 2.7.5, 2.7.6, 2.7.7, 2.7.8, 2.7.9, 2.7.10, 2.8.0, 2.8.1, 2.8.2, 2.8.3, 2.8.4, 2.8.5, 2.9.0, 2.9.1, 2.9.2, 2.9.3, 2.9.4, 2.9.5, 2.9.6, 2.9.7, 2.10.0, 2.10.0.1, 2.10.1, 2.10.2, 2.10.3, 2.10.4, 2.10.5, 2.10.6, 2.10.7, 2.10.8, 2.10.9, 2.10.10, 2.11.0, 2.11.0.1, 2.11.1, 2.11.2, 2.11.3, 2.11.4, 2.11.5, 2.11.6, 2.11.7, 2.11.8 (info)
Dependencies base (>=4 && <=5), directory, filepath, hspec (>=1.1 && <1.2) [details]
License MIT
Copyright (c) 2012 Simon Hengel
Author Simon Hengel <sol@typeful.net>
Maintainer Simon Hengel <sol@typeful.net>
Category Testing
Source repo head: git clone https://github.com/sol/hspec-discover
Uploaded by SimonHengel at 2012-05-16T06:56:36Z
Distributions Arch:2.10.9, Debian:2.7.1, Fedora:2.10.10, FreeBSD:2.1.10, LTSHaskell:2.11.7, NixOS:2.11.7, Stackage:2.11.8
Reverse Dependencies 6 direct, 431 indirect [details]
Executables hspec-discover
Downloads 157768 total (797 in the last 30 days)
Rating 2.25 (votes: 2) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs uploaded by user [build log]
Successful builds reported [all 1 reports]