hspec-1.4.4: Behavior-Driven Development for Haskell

Stabilityexperimental
Safe HaskellNone

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 :: Params -> a -> IO Result

Instances

data Params

Constructors

Params 

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 -> [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.

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.

Deprecated types and functions

type Spec = SpecTree

Deprecated: use `SpecTree` instead

type Specs = [SpecTree]

Deprecated: use `[SpecTree]` instead

hspecB :: [SpecTree] -> IO Bool

Deprecated: use `Test.Hspec.Runner.hspecWith` instead

hspecX :: [SpecTree] -> IO ()

Deprecated: use `Test.Hspec.Runner.hspec` instead

hHspec :: Handle -> [SpecTree] -> IO Summary

Deprecated: use `Test.Hspec.Runner.hspecWith` instead

hspec :: [SpecTree] -> IO ()

Deprecated: use `Test.Hspec.Runner.hspec` instead

type Pending = Pending

Deprecated: use `Test.Hspec.Pending` instead

pending :: String -> Pending

Deprecated: use `Test.Hspec.pending` instead