packages feed

tmp-proc-0.8.0.1 / test / Test / Hspec / TmpProc.hs

module Test.Hspec.TmpProc  (  -- * functions    tdescribe  )whereimport           System.TmpProc (hasDocker)import           Test.Hspec{-| Like 'describe', but makes the specs @pending@ when docker is unavailable. -}tdescribe :: HasCallStack => String -> SpecWith a -> SpecWith atdescribe label action = do  noDocker <- not <$> runIO hasDocker  if noDocker then tmpPending label action else describe label actiontmpPending :: HasCallStack => String -> SpecWith a -> SpecWith atmpPending label spec = before_ (pendingWith noDockerMessage) $ describe label specnoDockerMessage :: StringnoDockerMessage = "docker could not be detected"