We are no longer offering accounts on this server. Consider https://gitlab.freedesktop.org/ as a place to host projects.

main.hs 878 Bytes
Newer Older
David L. L. Thomas's avatar
David L. L. Thomas committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE NoMonomorphismRestriction #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}

module Main where

import Import
import TestImport
import Yesod.Default.Config
-- import Yesod.Test
import Test.Hspec (hspec)
import Application (makeFoundation)

import DiscussionTest
David L. L. Thomas's avatar
David L. L. Thomas committed
15
import WikiTest
16
import BlogTest
David L. L. Thomas's avatar
David L. L. Thomas committed
17

18
import System.IO
David L. L. Thomas's avatar
David L. L. Thomas committed
19 20 21

main :: IO ()
main = do
22
    liftIO $ hPutStrLn stderr "starting test program" >> hFlush stderr
David L. L. Thomas's avatar
David L. L. Thomas committed
23 24 25 26
    conf <- Yesod.Default.Config.loadConfig $ (configSettings Testing)
                { csParseExtra = parseExtra
                }

27
    liftIO $ hPutStrLn stderr "building foundation" >> hFlush stderr
David L. L. Thomas's avatar
David L. L. Thomas committed
28 29 30
    foundation <- makeFoundation conf


31 32
    liftIO $ hPutStrLn stderr "running test" >> hFlush stderr

David L. L. Thomas's avatar
David L. L. Thomas committed
33 34
    hspec $ do
        yesodSpec foundation $ do
David L. L. Thomas's avatar
David L. L. Thomas committed
35
            wikiSpecs
36

David L. L. Thomas's avatar
David L. L. Thomas committed
37 38
            discussionSpecs

39 40
            blogSpecs