Hspec: Skipping tests
I have some acceptance tests that I only want to run locally (i.e. skip them in the CI). when :: Applicative f => Bool -> f () -> f()
from Control.Monad allows for conditional execution of Applicative
expressions, so I can do something like
module FooSpec where
spec :: Spec
spec = do
devMode <- runIO isDevMode
when devMode $ describe "foobar" $ using chrome ...
isDevMode :: IO Bool
isDevMode = getEnvDefault ..