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 ..
 
3
Kudos
 
3
Kudos

Now read this

Having some fun (and pain) with generics

Decided to try and wrap my head around generic programming and ended up sinking too much time trying to understand (or not?) some of the basic ideas. Just for fun, I tried to think how it would be possible to go from a homogenous list... Continue →