Stability | experimental |
---|---|
Safe Haskell | None |
Language | Haskell98 |
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!
- class Example e where
- type Arg e
- evaluateExample :: e -> Params -> (ActionWith (Arg e) -> IO ()) -> ProgressCallback -> IO Result
- data Params = Params {}
- type Progress = (Int, Int)
- type ProgressCallback = Progress -> IO ()
- data Result
- data SpecM a r
- runSpecM :: SpecWith a -> IO [SpecTree a]
- fromSpecList :: [SpecTree a] -> SpecWith a
- data SpecTree a
- = SpecGroup String [SpecTree a]
- | SpecWithCleanup (ActionWith a) [SpecTree a]
- | SpecItem (Item a)
- mapSpecTree :: (SpecTree a -> SpecTree b) -> SpecWith a -> SpecWith b
- data Item a = Item {
- itemRequirement :: String
- itemLocation :: Maybe Location
- itemIsParallelizable :: Bool
- itemExample :: Params -> (ActionWith a -> IO ()) -> ProgressCallback -> IO Result
- data Location = Location {}
- data LocationAccuracy
- type ActionWith a = a -> IO ()
- mapSpecItem :: (ActionWith a -> ActionWith b) -> (Item a -> Item b) -> SpecWith a -> SpecWith b
- mapSpecItem_ :: (Item a -> Item a) -> SpecWith a -> SpecWith a
- modifyParams :: (Params -> Params) -> SpecWith a -> SpecWith a
- describe :: String -> [SpecTree a] -> SpecTree a
- it :: Example a => String -> a -> SpecTree (Arg a)
A type class for examples
A type class for examples.
evaluateExample :: e -> Params -> (ActionWith (Arg e) -> IO ()) -> ProgressCallback -> IO Result Source
type ProgressCallback = Progress -> IO () Source
The result of running an example.
A writer monad for constructing specs
A writer monad for SpecTree
forests.
Internal representation of a spec tree
Internal representation of a spec.
SpecGroup String [SpecTree a] | |
SpecWithCleanup (ActionWith a) [SpecTree a] | |
SpecItem (Item a) |
Item | |
|
type ActionWith a = a -> IO () Source
An IO
action that expects an argument of type a
.
mapSpecItem :: (ActionWith a -> ActionWith b) -> (Item a -> Item b) -> SpecWith a -> SpecWith b Source