Commits

Luke Plant committed 962e78c

Fixes for test set up

Comments (0)

Files changed (3)

src/Blog/settingslocal.hs

 prog_uri = "/cgi-bin/blog.cgi" -- Used for redirecting
 
 -- Testing
-testdb_sqlite_path = "/home/luke/devel/haskell/haskellblog/testsuite/test.db"
+testdb_sqlite_path = "/home/luke/devel/haskell/blog/testsuite/test.db"
 
 -- Migration time settings:
 

testsuite/runtests.sh

 #!/bin/sh
 DIR=`dirname $0`
+rm $DIR/test.db 2> /dev/null
 runhaskell -i$DIR/tests:$DIR/../src $DIR/tests/Main.hs

testsuite/tests/Tests/Blog/TestDB.hs

 import Database.HDBC.Sqlite3 (connectSqlite3)
 import qualified Blog.Settings as Settings
 
+-- TODO - make testdb_sqlite_path into a command-line argument so that
+-- the tests can be run without having to change the settings
 connect = connectSqlite3 Settings.testdb_sqlite_path