Reorganize specs

This commit is contained in:
Fujimura Daisuke 2014-08-18 14:37:05 +08:00
parent 4696355085
commit f6d886e8bd
4 changed files with 6 additions and 14 deletions

View file

@ -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

View file

@ -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
View file

@ -0,0 +1 @@
{-# OPTIONS_GHC -F -pgmF hspec-discover #-}

View file

@ -1,8 +0,0 @@
module Main where
import Test.Hspec (hspec)
import QueryTest
main :: IO ()
main = hspec $ do
querySpec