hspec-1.12.4: A Testing Framework for Haskell

Stabilityexperimental
Safe HaskellNone
LanguageHaskell2010

Test.Hspec.Core

Contents

Description

This module provides access to Hspec's internals. It is less stable than other parts of the API. For most users Test.Hspec is more suitable!

Synopsis

A type class for examples

class Example a where Source

A type class for examples.

Methods

evaluateExample :: a -> Params -> (IO () -> IO ()) -> ProgressCallback -> IO Result Source

data Result Source

The result of running an example.

A writer monad for constructing specs

data SpecM a Source

A writer monad for SpecTree forests.

runSpecM :: Spec -> IO [SpecTree] Source

Convert a Spec to a forest of SpecTrees.

fromSpecList :: [SpecTree] -> Spec Source

Create a Spec from a forest of SpecTrees.

Internal representation of a spec tree

data SpecTree Source

Internal representation of a spec.

specGroup :: String -> [SpecTree] -> SpecTree Source

The specGroup function combines a list of specs into a larger spec.

specItem :: Example a => String -> a -> SpecTree Source

The specItem function creates a spec item.

Deprecated functions

describe :: String -> [SpecTree] -> SpecTree Source

Deprecated: use specGroup instead

it :: Example a => String -> a -> SpecTree Source

Deprecated: use specItem instead