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