This module contains the core types, constructors, classes, instances, and utility functions common to hspec.
- data Result
- type UnevaluatedSpec = Spec AnyExample
- type EvaluatedSpec = Spec Result
- data Spec a
- describe :: String -> [Spec a] -> Spec a
- descriptions :: [Spec a] -> [Spec a]
- safeEvaluateExample :: AnyExample -> IO Result
- it :: Example a => String -> a -> UnevaluatedSpec
- class Example a where
- data AnyExample = forall a . Example a => AnyExample a
- pending :: String -> Result
- failedCount :: [EvaluatedSpec] -> Int
- failure :: [EvaluatedSpec] -> Bool
- success :: [EvaluatedSpec] -> Bool
- isFailure :: Result -> Bool
- quantify :: (Show a, Num a, Eq a) => a -> String -> String
The result of running an example.
DEPRECATED: This is no longer needed (it's just an alias for
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) ]
An existentially quantified
Example. This way they can be mixed within the same set of Specs
Declare an example as not successful or failing but pending some other work. If you want to report on a behavior but don't have an example yet, use this.
describe "fancyFormatter" [ it "can format text in a way that everyone likes" (pending "waiting for clarification from the designers") ]