packages feed

stackctl-1.7.2.0: test/Stackctl/CancelHandlerSpec.hs

module Stackctl.CancelHandlerSpec
  ( spec
  ) where

import Stackctl.Prelude

import qualified Stackctl.CancelHandler as CancelHandler
import Test.Hspec

spec :: Spec
spec = do
  describe "with" $ do
    fit "installs a handler for the duration of a block" $ example $ do
      done <- newEmptyMVar

      CancelHandler.install $ putMVar done ()
      CancelHandler.trigger

      takeMVar done `shouldReturn` ()