Safe Haskell | Safe-Inferred |
---|
Test.Hspec
Description
A lightweight implementation of a subset of Hspec's API.
- data SpecM a
- type Spec = SpecM ()
- describe :: String -> Spec -> Spec
- context :: String -> Spec -> Spec
- it :: String -> Expectation -> Spec
- type Expectation = IO ()
- expect :: String -> Bool -> Expectation
- shouldBe :: (Show a, Eq a) => a -> a -> Expectation
- shouldReturn :: (Show a, Eq a) => IO a -> a -> Expectation
- hspec :: Spec -> IO ()
Types
Defining a spec
it :: String -> Expectation -> SpecSource
Setting expectations
type Expectation = IO ()Source
expect :: String -> Bool -> ExpectationSource
shouldBe :: (Show a, Eq a) => a -> a -> ExpectationSource
shouldReturn :: (Show a, Eq a) => IO a -> a -> ExpectationSource