hspec-1.11.0: Behavior-Driven Development for Haskell

Stabilityexperimental
Safe HaskellNone
LanguageHaskell98

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

A type class for examples.

Methods

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

data Params

Instances

type Progress = (Int, Int)

data Result

The result of running an example.

A writer monad for constructing specs

data SpecM a

A writer monad for SpecTree forests.

runSpecM :: Spec -> IO [SpecTree]

Convert a Spec to a forest of SpecTrees.

fromSpecList :: [SpecTree] -> Spec

Create a Spec from a forest of SpecTrees.

Internal representation of a spec tree

data SpecTree

Internal representation of a spec.

data Item

Constructors

Item 

mapSpecItem :: (Item -> Item) -> Spec -> Spec

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

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

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

Create a spec item.