fix ActionWith usage

This commit is contained in:
Greg Weber 2015-03-05 12:00:01 -08:00
parent 98bcc2dfe8
commit 91701962c3
2 changed files with 3 additions and 3 deletions

View file

@ -62,7 +62,7 @@ test-suite test
build-depends: mongoDB build-depends: mongoDB
, base , base
, mtl , mtl
, hspec , hspec >= 2
default-language: Haskell2010 default-language: Haskell2010
default-extensions: OverloadedStrings default-extensions: OverloadedStrings

View file

@ -15,8 +15,8 @@ db action = do
close pipe close pipe
return result return result
withCleanDatabase :: IO a -> IO () withCleanDatabase :: ActionWith () -> IO ()
withCleanDatabase action = dropDB >> action >> dropDB >> return () withCleanDatabase action = dropDB >> action () >> dropDB >> return ()
where where
dropDB = db $ dropDatabase testDBName dropDB = db $ dropDatabase testDBName