]> git.immae.eu Git - github/fretlink/squeal-hspec.git/blame - README.md
Merge pull request #6 from antoine-fl/bump_squeal
[github/fretlink/squeal-hspec.git] / README.md
CommitLineData
aa94c1a5 1# squeal-hspec
8c738ffc 2
d7b45e63
R
3Helpers for creating database tests with hspec and squeal, inspired by Jonathan
4Fischoff's
8c738ffc
R
5[hspec-pg-transact](http://hackage.haskell.org/package/hspec-pg-transact).
6
d7b45e63
R
7This uses @tmp-postgres@ to automatically and connect to a temporary instance of
8postgres on a random port.
8c738ffc
R
9
10Current version is done to operate with Squeal 0.4.0.0.
11
d7b45e63
R
12`describeDB` lets you initate a series of `itDB` specs which will operate in the
13same context. It takes migrations to run and a series of fixtures to fill the
14database.
15
16Setting the env var `TEST_DB_CONNECTION_STRING` will let you use a non-temporary
17database if need be. Tear down will run the `migrateDown` to make sure the test
18db doesn't get filled with invalid data.