Safe Haskell | Safe-Infered |
---|
This module contains the runners that take a set of specs, evaluate their examples, and report to a given handle.
- type Specs = [Spec]
- hspec :: Specs -> IO [EvaluatedSpec]
- hspecX :: Specs -> IO a
- hspecB :: Specs -> IO Bool
- hHspec :: Handle -> Specs -> IO [EvaluatedSpec]
- hHspecWithFormat :: Formatter -> Bool -> Handle -> Specs -> IO [EvaluatedSpec]
- describe :: String -> [Spec] -> Spec
- it :: Example a => String -> a -> Spec
- toExitCode :: Bool -> ExitCode
Documentation
hspec :: Specs -> IO [EvaluatedSpec]Source
Create a document of the given specs and write it to stdout.
hHspec :: Handle -> Specs -> IO [EvaluatedSpec]Source
Create a document of the given specs and write it to the given handle.
writeReport filename specs = withFile filename WriteMode (\h -> hHspec h specs)
hHspecWithFormat :: Formatter -> Bool -> Handle -> Specs -> IO [EvaluatedSpec]Source
Create a document of the given specs and write it to the given handle. THIS IS LIKELY TO CHANGE
it :: Example a => String -> a -> SpecSource
Create a set of specifications for a specific type being described. Once you know what you want specs for, use this.
describe "abs" [ it "returns a positive number given a negative number" (abs (-1) == 1) ]
toExitCode :: Bool -> ExitCodeSource