hspec-1.7.2.1: 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 whereSource

A type class for examples.

Instances

Example Bool 
Example Test

This instance is deprecated, use fromHUnitTest instead!

Example Property 
Example Expectation 
Example Result 

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 -> [SpecTree]Source

Convert a Spec to a forest of SpecTrees.

fromSpecList :: [SpecTree] -> SpecSource

Create a Spec from a forest of SpecTrees.

Internal representation of a spec tree

data SpecTree Source

Internal representation of a spec.

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

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

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

Create a spec item.

Deprecated types and functions

type Spec = SpecTreeSource

Deprecated: use SpecTree instead

type Specs = [SpecTree]Source

Deprecated: use `[SpecTree]` instead

hspecB :: [SpecTree] -> IO BoolSource

Deprecated: use hspecWith instead

hspecX :: [SpecTree] -> IO ()Source

Deprecated: use hspec instead

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

Deprecated: use hspecWith instead

hspec :: [SpecTree] -> IO ()Source

Deprecated: use hspec instead