module Test.Hspec.Core (
Example (..)
, Params (..)
, Progress
, Result (..)
, SpecM
, runSpecM
, fromSpecList
, SpecTree (..)
, describe
, it
, Spec
, Specs
, hspecB
, hspecX
, hHspec
, hspec
) where
import Control.Applicative
import System.IO (Handle)
import Test.Hspec.Core.Type hiding (Spec)
import qualified Test.Hspec.Runner as Runner
import Test.Hspec.Runner (Summary(..), Config(..), defaultConfig)
hspecWith :: Config -> [SpecTree] -> IO Summary
hspecWith c = Runner.hspecWith c . fromSpecList
hspecX :: [SpecTree] -> IO ()
hspecX = hspec
hspec :: [SpecTree] -> IO ()
hspec = Runner.hspec . fromSpecList
hspecB :: [SpecTree] -> IO Bool
hspecB spec = (== 0) . summaryFailures <$> hspecWith defaultConfig spec
hHspec :: Handle -> [SpecTree] -> IO Summary
hHspec h = hspecWith defaultConfig {configHandle = Left h}
type Spec = SpecTree
type Specs = [SpecTree]