Test.Hspec.Core.Hooks

hspec-core-2.3.2: A Testing Framework for Haskell

Stability | provisional
Safe Haskell | None
Language | Haskell2010

Test.Hspec.Core.Hooks

Description

Synopsis

- before :: IO a -> SpecWith a -> Spec
- before_ :: IO () -> SpecWith a -> SpecWith a
- beforeWith :: (b -> IO a) -> SpecWith a -> SpecWith b
- beforeAll :: IO a -> SpecWith a -> Spec
- beforeAll_ :: IO () -> SpecWith a -> SpecWith a
- after :: ActionWith a -> SpecWith a -> SpecWith a
- after_ :: IO () -> SpecWith a -> SpecWith a
- afterAll :: ActionWith a -> SpecWith a -> SpecWith a
- afterAll_ :: IO () -> SpecWith a -> SpecWith a
- around :: (ActionWith a -> IO ()) -> SpecWith a -> Spec
- around_ :: (IO () -> IO ()) -> SpecWith a -> SpecWith a
- aroundWith :: (ActionWith a -> ActionWith b) -> SpecWith a -> SpecWith b

# Documentation

before :: IO a -> SpecWith a -> Spec #

Run a custom action before every spec item.

before_ :: IO () -> SpecWith a -> SpecWith a #

Run a custom action before every spec item.

beforeWith :: (b -> IO a) -> SpecWith a -> SpecWith b #

Run a custom action before every spec item.

beforeAll :: IO a -> SpecWith a -> Spec #

Run a custom action before the first spec item.

beforeAll_ :: IO () -> SpecWith a -> SpecWith a #

Run a custom action before the first spec item.

after :: ActionWith a -> SpecWith a -> SpecWith a #

Run a custom action after every spec item.

after_ :: IO () -> SpecWith a -> SpecWith a #

Run a custom action after every spec item.

afterAll :: ActionWith a -> SpecWith a -> SpecWith a #

Run a custom action after the last spec item.

afterAll_ :: IO () -> SpecWith a -> SpecWith a #

Run a custom action after the last spec item.

around :: (ActionWith a -> IO ()) -> SpecWith a -> Spec #

Run a custom action before and/or after every spec item.

around_ :: (IO () -> IO ()) -> SpecWith a -> SpecWith a #

Run a custom action before and/or after every spec item.

aroundWith :: (ActionWith a -> ActionWith b) -> SpecWith a -> SpecWith b #

Run a custom action before and/or after every spec item.