hspec-2.5.5: A Testing Framework for Haskell

Stabilityunstable
Safe HaskellNone
LanguageHaskell2010

Test.Hspec.Core

Contents

Description

Deprecated: use Test.Hspec.Core.Spec instead

Synopsis

Documentation

xit :: (HasCallStack, Example a) => String -> a -> SpecWith (Arg a) #

mapSpecItem :: (ActionWith a -> ActionWith b) -> (Item a -> Item b) -> SpecWith a -> SpecWith b #

mapSpecItem_ :: (Item a -> Item a) -> SpecWith a -> SpecWith a #

runIO :: IO r -> SpecM a r #

type ActionWith a = a -> IO () #

class Example e where #

Minimal complete definition

evaluateExample

Associated Types

type Arg e :: * #

Methods

evaluateExample :: e -> Params -> (ActionWith (Arg e) -> IO ()) -> ProgressCallback -> IO Result #

Instances
Example Bool 
Instance details

Defined in Test.Hspec.Core.Example

Associated Types

type Arg Bool :: * #

Example Property 
Instance details

Defined in Test.Hspec.Core.Example

Associated Types

type Arg Property :: * #

Example Expectation 
Instance details

Defined in Test.Hspec.Core.Example

Associated Types

type Arg Expectation :: * #

Example Result 
Instance details

Defined in Test.Hspec.Core.Example

Associated Types

type Arg Result :: * #

Example (a -> Result) 
Instance details

Defined in Test.Hspec.Core.Example

Associated Types

type Arg (a -> Result) :: * #

Methods

evaluateExample :: (a -> Result) -> Params -> (ActionWith (Arg (a -> Result)) -> IO ()) -> ProgressCallback -> IO Result #

Example (a -> Bool) 
Instance details

Defined in Test.Hspec.Core.Example

Associated Types

type Arg (a -> Bool) :: * #

Methods

evaluateExample :: (a -> Bool) -> Params -> (ActionWith (Arg (a -> Bool)) -> IO ()) -> ProgressCallback -> IO Result #

Example (a -> Expectation) 
Instance details

Defined in Test.Hspec.Core.Example

Associated Types

type Arg (a -> Expectation) :: * #

Methods

evaluateExample :: (a -> Expectation) -> Params -> (ActionWith (Arg (a -> Expectation)) -> IO ()) -> ProgressCallback -> IO Result #

Example (a -> Property) 
Instance details

Defined in Test.Hspec.Core.Example

Associated Types

type Arg (a -> Property) :: * #

Methods

evaluateExample :: (a -> Property) -> Params -> (ActionWith (Arg (a -> Property)) -> IO ()) -> ProgressCallback -> IO Result #

data Params #

Instances
Show Params 
Instance details

Defined in Test.Hspec.Core.Example

type Progress = (Int, Int) #

data Result #

Constructors

Result 
Instances
Show Result 
Instance details

Defined in Test.Hspec.Core.Example

Example Result 
Instance details

Defined in Test.Hspec.Core.Example

Associated Types

type Arg Result :: * #

Example (a -> Result) 
Instance details

Defined in Test.Hspec.Core.Example

Associated Types

type Arg (a -> Result) :: * #

Methods

evaluateExample :: (a -> Result) -> Params -> (ActionWith (Arg (a -> Result)) -> IO ()) -> ProgressCallback -> IO Result #

type Arg Result 
Instance details

Defined in Test.Hspec.Core.Example

type Arg Result = ()
type Arg (a -> Result) 
Instance details

Defined in Test.Hspec.Core.Example

type Arg (a -> Result) = a

type Spec = SpecWith () #

newtype SpecM a r #

Constructors

SpecM (WriterT [SpecTree a] IO r) 
Instances
Monad (SpecM a) 
Instance details

Defined in Test.Hspec.Core.Spec.Monad

Methods

(>>=) :: SpecM a a0 -> (a0 -> SpecM a b) -> SpecM a b #

(>>) :: SpecM a a0 -> SpecM a b -> SpecM a b #

return :: a0 -> SpecM a a0 #

fail :: String -> SpecM a a0 #

Functor (SpecM a) 
Instance details

Defined in Test.Hspec.Core.Spec.Monad

Methods

fmap :: (a0 -> b) -> SpecM a a0 -> SpecM a b #

(<$) :: a0 -> SpecM a b -> SpecM a a0 #

Applicative (SpecM a) 
Instance details

Defined in Test.Hspec.Core.Spec.Monad

Methods

pure :: a0 -> SpecM a a0 #

(<*>) :: SpecM a (a0 -> b) -> SpecM a a0 -> SpecM a b #

liftA2 :: (a0 -> b -> c) -> SpecM a a0 -> SpecM a b -> SpecM a c #

(*>) :: SpecM a a0 -> SpecM a b -> SpecM a b #

(<*) :: SpecM a a0 -> SpecM a b -> SpecM a a0 #

type SpecWith a = SpecM a () #

type SpecTree a = Tree (ActionWith a) (Item a) #

data Tree c a #

Constructors

Node String [Tree c a] 
NodeWithCleanup c [Tree c a] 
Leaf a 
Instances
Functor (Tree c) 
Instance details

Defined in Test.Hspec.Core.Tree

Methods

fmap :: (a -> b) -> Tree c a -> Tree c b #

(<$) :: a -> Tree c b -> Tree c a #

Foldable (Tree c) 
Instance details

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 #

toList :: Tree c a -> [a] #

null :: Tree c a -> Bool #

length :: Tree c a -> Int #

elem :: Eq a => a -> Tree c a -> Bool #

maximum :: Ord a => Tree c a -> a #

minimum :: Ord a => Tree c a -> a #

sum :: Num a => Tree c a -> a #

product :: Num a => Tree c a -> a #

Traversable (Tree c) 
Instance details

Defined in Test.Hspec.Core.Tree

Methods

traverse :: Applicative f => (a -> f b) -> Tree c a -> f (Tree c b) #

sequenceA :: Applicative f => Tree c (f a) -> f (Tree c a) #

mapM :: Monad m => (a -> m b) -> Tree c a -> m (Tree c b) #

sequence :: Monad m => Tree c (m a) -> m (Tree c a) #

Deprecated functions

it :: Example a => String -> a -> SpecTree (Arg a) Source #