fix ActionWith usage
This commit is contained in:
parent
98bcc2dfe8
commit
91701962c3
2 changed files with 3 additions and 3 deletions
|
@ -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
|
||||||
|
|
|
@ -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
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue