hspec-core-2.4.4: A Testing Framework for Haskell

Test.Hspec.Core.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.

hspecWith :: Config -> Spec -> IO () Source #

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

Run given spec and returns a summary of the test run.

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

Run given spec with custom options and returns a summary of the test run.

Note: hspecWithResult 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 Fields

Instances

 Source # Methods(==) :: Summary -> Summary -> Bool #(/=) :: Summary -> Summary -> Bool # Source # MethodsshowList :: [Summary] -> ShowS # Source # Methodsmconcat :: [Summary] -> Summary #

data Config Source #

Constructors

 Config FieldsconfigIgnoreConfigFile :: Bool configDryRun :: Bool configPrintCpuTime :: Bool configFastFail :: Bool configFailureReport :: Maybe FilePath configRerun :: Bool configRerunAllOnSuccess :: 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.configSkipPredicate :: Maybe (Path -> Bool) configQuickCheckSeed :: Maybe Integer configQuickCheckMaxSuccess :: Maybe Int configQuickCheckMaxDiscardRatio :: Maybe Int configQuickCheckMaxSize :: Maybe Int configSmallCheckDepth :: Int configColorMode :: ColorMode configDiff :: Bool configFormatter :: Maybe Formatter configHtmlOutput :: Bool configOutputFile :: Either Handle FilePath configConcurrentJobs :: Maybe Int

data ColorMode Source #

Constructors

 ColorAuto ColorNever ColorAlways

Instances

 Source # Methods Source # MethodsshowList :: [ColorMode] -> ShowS #

type Path = ([String], String) Source #

A Path represents the location of an example within the spec tree.

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

configAddFilter :: (Path -> Bool) -> Config -> Config Source #

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