Reorganize specs
This commit is contained in:
parent
4696355085
commit
f6d886e8bd
4 changed files with 6 additions and 14 deletions
|
@ -55,10 +55,9 @@ Source-repository head
|
|||
|
||||
test-suite test
|
||||
hs-source-dirs: test
|
||||
main-is: main.hs
|
||||
main-is: Spec.hs
|
||||
ghc-options: -Wall
|
||||
type: exitcode-stdio-1.0
|
||||
|
||||
build-depends: mongoDB
|
||||
, base
|
||||
, mtl
|
||||
|
@ -66,4 +65,3 @@ test-suite test
|
|||
|
||||
default-language: Haskell2010
|
||||
default-extensions: OverloadedStrings
|
||||
|
||||
|
|
|
@ -1,11 +1,12 @@
|
|||
module QueryTest (querySpec) where
|
||||
{-# LANGUAGE OverloadedStrings #-}
|
||||
module QuerySpec (spec) where
|
||||
import TestImport
|
||||
|
||||
fakeDB :: MonadIO m => Action m a -> m a
|
||||
fakeDB = access (error "Pipe") (error "AccessMode") "fake"
|
||||
|
||||
querySpec :: Spec
|
||||
querySpec =
|
||||
spec :: Spec
|
||||
spec =
|
||||
describe "useDb" $
|
||||
it "changes the db" $ do
|
||||
db1 <- fakeDB thisDatabase
|
1
test/Spec.hs
Normal file
1
test/Spec.hs
Normal file
|
@ -0,0 +1 @@
|
|||
{-# OPTIONS_GHC -F -pgmF hspec-discover #-}
|
|
@ -1,8 +0,0 @@
|
|||
module Main where
|
||||
import Test.Hspec (hspec)
|
||||
|
||||
import QueryTest
|
||||
|
||||
main :: IO ()
|
||||
main = hspec $ do
|
||||
querySpec
|
Loading…
Reference in a new issue