hspec-api-2.11.16: A Testing Framework for Haskell
Stabilitystable
Safe HaskellNone
LanguageHaskell2010

Test.Hspec.Api.Format.V1

Description

 
Synopsis

Documentation

type Format = Event -> IO () Source #

data FormatConfig Source #

Constructors

FormatConfig 

Fields

data Event Source #

Instances

Instances details
Show Event Source # 
Instance details

Defined in Test.Hspec.Api.Format.V1

Methods

showsPrec :: Int -> Event -> ShowS

show :: Event -> String

showList :: [Event] -> ShowS

type Progress = (Int, Int) Source #

(CurrentItem, TotalItems) tuple.

type Path = ([String], String) Source #

A Path describes the location of a spec item within a spec tree.

It consists of a list of group descriptions and a requirement description.

Since: hspec-core-2.0.0

data Location Source #

Location is used to represent source locations.

Constructors

Location 

Fields

Instances

Instances details
Read Location 
Instance details

Defined in Test.Hspec.Core.Example.Location

Methods

readsPrec :: Int -> ReadS Location

readList :: ReadS [Location]

readPrec :: ReadPrec Location

readListPrec :: ReadPrec [Location]

Show Location 
Instance details

Defined in Test.Hspec.Core.Example.Location

Methods

showsPrec :: Int -> Location -> ShowS

show :: Location -> String

showList :: [Location] -> ShowS

Eq Location 
Instance details

Defined in Test.Hspec.Core.Example.Location

Methods

(==) :: Location -> Location -> Bool

(/=) :: Location -> Location -> Bool

newtype Seconds Source #

Constructors

Seconds Double 

Instances

Instances details
PrintfArg Seconds 
Instance details

Defined in Test.Hspec.Core.Clock

Methods

formatArg :: Seconds -> FieldFormatter

parseFormat :: Seconds -> ModifierParser

Num Seconds 
Instance details

Defined in Test.Hspec.Core.Clock

Fractional Seconds 
Instance details

Defined in Test.Hspec.Core.Clock

Methods

(/) :: Seconds -> Seconds -> Seconds

recip :: Seconds -> Seconds

fromRational :: Rational -> Seconds

Show Seconds 
Instance details

Defined in Test.Hspec.Core.Clock

Methods

showsPrec :: Int -> Seconds -> ShowS

show :: Seconds -> String

showList :: [Seconds] -> ShowS

Eq Seconds 
Instance details

Defined in Test.Hspec.Core.Clock

Methods

(==) :: Seconds -> Seconds -> Bool

(/=) :: Seconds -> Seconds -> Bool

Ord Seconds 
Instance details

Defined in Test.Hspec.Core.Clock

Methods

compare :: Seconds -> Seconds -> Ordering

(<) :: Seconds -> Seconds -> Bool

(<=) :: Seconds -> Seconds -> Bool

(>) :: Seconds -> Seconds -> Bool

(>=) :: Seconds -> Seconds -> Bool

max :: Seconds -> Seconds -> Seconds

min :: Seconds -> Seconds -> Seconds

data Item Source #

Constructors

Item 

Fields

Instances

Instances details
Show Item Source # 
Instance details

Defined in Test.Hspec.Api.Format.V1.Internal

Methods

showsPrec :: Int -> Item -> ShowS

show :: Item -> String

showList :: [Item] -> ShowS

data Result Source #

Constructors

Success 
Pending (Maybe Location) (Maybe String) 
Failure (Maybe Location) FailureReason 

Instances

Instances details
Show Result Source # 
Instance details

Defined in Test.Hspec.Api.Format.V1.Internal

Methods

showsPrec :: Int -> Result -> ShowS

show :: Result -> String

showList :: [Result] -> ShowS

data FailureReason Source #

Constructors

NoReason 
Reason String 
ExpectedButGot (Maybe String) String String 
Error (Maybe String) SomeException 

Instances

Instances details
Show FailureReason 
Instance details

Defined in Test.Hspec.Core.Formatters.V1.Monad

Methods

showsPrec :: Int -> FailureReason -> ShowS

show :: FailureReason -> String

showList :: [FailureReason] -> ShowS

monadic :: MonadIO m => (m () -> IO ()) -> (Event -> m ()) -> IO Format Source #

Register a formatter

registerFormatter :: (String, FormatConfig -> IO Format) -> Config -> Config Source #

Make a formatter available for use with --format.

useFormatter :: (String, FormatConfig -> IO Format) -> Config -> Config Source #

Make a formatter available for use with --format and use it by default.

liftFormatter :: (String, FormatConfig -> IO Format) -> (String, FormatConfig -> IO Format) Source #

Make a formatter compatible with types from Test.Hspec.Core.Format.

Re-exports

type SpecWith a = SpecM a () Source #

A SpecWith a represents a test or group of tests that require an a value to run.

In the common case, a Spec is a SpecWith () which requires () and can thus be executed with hspec.

To supply an argument to SpecWith tests to turn them into Spec, use functions from Test.Hspec.Core.Hooks such as around, before, mapSubject and similar.

Values of this type are created by it, describe and similar.

modifyConfig :: (Config -> Config) -> SpecWith a Source #

Since: hspec-core-2.10.0