hspec-1.4.2.1: Behavior-Driven Development for Haskell

Stabilityprovisional
Safe HaskellNone

Test.Hspec.Runner

Contents

Description

 

Synopsis

Running a spec

hspec :: Spec -> IO ()Source

Run given spec and write a report to stdout. Exit with exitFailure if at least one spec item fails.

(see also hspecWith)

hspecWith :: Config -> Spec -> IO SummarySource

Run given spec with custom options. This is similar to hspec, but more flexible.

Note: hspecWith does not exit with exitFailure on failing spec items. If you need this, you have to check the Summary yourself and act accordingly.

Types

data Summary Source

Summary of a test run.

Constructors

Summary 

data Config Source

Constructors

Config 

Fields

configVerbose :: Bool
 
configPrintCpuTime :: Bool
 
configReRun :: Bool
 
configFilterPredicate :: Maybe (Path -> Bool)

A predicate that is used to filter the spec before it is run. Only examples that satisfy the predicate are run.

configParams :: Params
 
configColorMode :: ColorMode
 
configFormatter :: Formatter
 
configHtmlOutput :: Bool
 
configHandle :: Handle
 

type Path = ([String], String)Source

A tuple that represents the location of an example within a spec.

It consists of a list of group descriptions and a requirement description.

configAddFilter :: (Path -> Bool) -> Config -> ConfigSource

Add a filter predicate to config. If there is already a filter predicate, then combine them with ||.