module Test.Hspec.Core (
Example (..)
, Params (..)
, Result (..)
, SpecM
, runSpecM
, fromSpecList
, SpecTree (..)
, describe
, it
, Spec
, Specs
, hspecB
, hspecX
, hHspec
, hspec
, Pending
, pending
) where
import Control.Applicative
import System.IO (Handle)
import Test.Hspec.Core.Type hiding (Spec)
import qualified Test.Hspec.Pending as Pending
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 = h}
type Spec = SpecTree
type Specs = [SpecTree]
pending :: String -> Pending
pending = Pending.pending
type Pending = Pending.Pending