Stability | unstable |
---|---|
Safe Haskell | None |
Language | Haskell2010 |
Test.Hspec.Core
Contents
Description
Deprecated: use Test.Hspec.Core.Spec instead
Synopsis
- defaultParams :: Params
- safeEvaluateExample :: Example e => e -> Params -> (ActionWith (Arg e) -> IO ()) -> ProgressCallback -> IO Result
- context :: HasCallStack => String -> SpecWith a -> SpecWith a
- parallel :: SpecWith a -> SpecWith a
- pending :: HasCallStack -> Expectation
- pendingWith :: HasCallStack -> String -> Expectation
- sequential :: SpecWith a -> SpecWith a
- specify :: (HasCallStack, Example a) => String -> a -> SpecWith (Arg a)
- xcontext :: HasCallStack => String -> SpecWith a -> SpecWith a
- xdescribe :: HasCallStack => String -> SpecWith a -> SpecWith a
- xit :: (HasCallStack, Example a) => String -> a -> SpecWith (Arg a)
- xspecify :: (HasCallStack, Example a) => String -> a -> SpecWith (Arg a)
- fromSpecList :: [SpecTree a] -> SpecWith a
- 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
- runIO :: IO r -> SpecM a r
- runSpecM :: SpecWith a -> IO [SpecTree a]
- location :: HasCallStack -> Maybe Location
- specGroup :: HasCallStack => String -> [SpecTree a] -> SpecTree a
- specItem :: (HasCallStack, Example a) => String -> a -> SpecTree (Arg a)
- type ActionWith a = a -> IO ()
- class Example e where
- data FailureReason
- data Params = Params {}
- type Progress = (Int, Int)
- type ProgressCallback = Progress -> IO ()
- data Result = Result {}
- data ResultStatus
- data Location = Location {}
- type Spec = SpecWith ()
- newtype SpecM a r = SpecM (WriterT [SpecTree a] IO r)
- type SpecWith a = SpecM a ()
- data Item a = Item {
- itemRequirement :: String
- itemLocation :: Maybe Location
- itemIsParallelizable :: Maybe Bool
- itemExample :: Params -> (ActionWith a -> IO ()) -> ProgressCallback -> IO Result
- type SpecTree a = Tree (ActionWith a) (Item a)
- data Tree c a
- describe :: String -> [SpecTree a] -> SpecTree a
- it :: Example a => String -> a -> SpecTree (Arg a)
Documentation
defaultParams :: Params #
safeEvaluateExample :: Example e => e -> Params -> (ActionWith (Arg e) -> IO ()) -> ProgressCallback -> IO Result #
pending :: HasCallStack -> Expectation #
pendingWith :: HasCallStack -> String -> Expectation #
sequential :: SpecWith a -> SpecWith a #
fromSpecList :: [SpecTree a] -> SpecWith a #
mapSpecItem :: (ActionWith a -> ActionWith b) -> (Item a -> Item b) -> SpecWith a -> SpecWith b #
location :: HasCallStack -> Maybe Location #
type ActionWith a = a -> IO () #
Minimal complete definition
Methods
evaluateExample :: e -> Params -> (ActionWith (Arg e) -> IO ()) -> ProgressCallback -> IO Result #
Instances
data FailureReason #
Constructors
NoReason | |
Reason String | |
ExpectedButGot (Maybe String) String String | |
Error (Maybe String) SomeException |
Instances
Show FailureReason | |
Defined in Test.Hspec.Core.Example Methods showsPrec :: Int -> FailureReason -> ShowS # show :: FailureReason -> String # showList :: [FailureReason] -> ShowS # | |
NFData FailureReason | |
Defined in Test.Hspec.Core.Example Methods rnf :: FailureReason -> () # |
Constructors
Params | |
Fields |
type ProgressCallback = Progress -> IO () #
Constructors
Result | |
Fields |
Instances
Show Result | |
Example Result | |
Defined in Test.Hspec.Core.Example Methods evaluateExample :: Result -> Params -> (ActionWith (Arg Result) -> IO ()) -> ProgressCallback -> IO Result # | |
Example (a -> Result) | |
Defined in Test.Hspec.Core.Example Methods evaluateExample :: (a -> Result) -> Params -> (ActionWith (Arg (a -> Result)) -> IO ()) -> ProgressCallback -> IO Result # | |
type Arg Result | |
Defined in Test.Hspec.Core.Example | |
type Arg (a -> Result) | |
Defined in Test.Hspec.Core.Example |
data ResultStatus #
Instances
Show ResultStatus | |
Defined in Test.Hspec.Core.Example Methods showsPrec :: Int -> ResultStatus -> ShowS # show :: ResultStatus -> String # showList :: [ResultStatus] -> ShowS # | |
Exception ResultStatus | |
Defined in Test.Hspec.Core.Example Methods toException :: ResultStatus -> SomeException # fromException :: SomeException -> Maybe ResultStatus # displayException :: ResultStatus -> String # |
Constructors
Location | |
Fields
|
Constructors
Item | |
Fields
|
type SpecTree a = Tree (ActionWith a) (Item a) #
Instances
Functor (Tree c) | |
Foldable (Tree c) | |
Defined in Test.Hspec.Core.Tree Methods fold :: Monoid m => Tree c m -> m # foldMap :: Monoid m => (a -> m) -> Tree c a -> m # foldr :: (a -> b -> b) -> b -> Tree c a -> b # foldr' :: (a -> b -> b) -> b -> Tree c a -> b # foldl :: (b -> a -> b) -> b -> Tree c a -> b # foldl' :: (b -> a -> b) -> b -> Tree c a -> b # foldr1 :: (a -> a -> a) -> Tree c a -> a # foldl1 :: (a -> a -> a) -> Tree c a -> a # elem :: Eq a => a -> Tree c a -> Bool # maximum :: Ord a => Tree c a -> a # minimum :: Ord a => Tree c a -> a # | |
Traversable (Tree c) | |