diff --git a/mongoDB.cabal b/mongoDB.cabal index ed1206b..ad2174e 100644 --- a/mongoDB.cabal +++ b/mongoDB.cabal @@ -62,7 +62,7 @@ test-suite test build-depends: mongoDB , base , mtl - , hspec + , hspec >= 2 default-language: Haskell2010 default-extensions: OverloadedStrings diff --git a/test/QuerySpec.hs b/test/QuerySpec.hs index 8615919..db619f0 100644 --- a/test/QuerySpec.hs +++ b/test/QuerySpec.hs @@ -15,8 +15,8 @@ db action = do close pipe return result -withCleanDatabase :: IO a -> IO () -withCleanDatabase action = dropDB >> action >> dropDB >> return () +withCleanDatabase :: ActionWith () -> IO () +withCleanDatabase action = dropDB >> action () >> dropDB >> return () where dropDB = db $ dropDatabase testDBName