diff options
author | Raveline <eraveline@gmail.com> | 2019-05-03 11:44:05 +0200 |
---|---|---|
committer | Raveline <eraveline@gmail.com> | 2019-05-03 11:44:24 +0200 |
commit | d7b45e63148bb14dbbd3d61b4f5305338176dd45 (patch) | |
tree | 1b9e4edd979aad5bcc68b77c2f3d23db424c80f9 /README.md | |
parent | dd35032c658cf4136e94b18c87656a611931b0ed (diff) | |
download | squeal-hspec-d7b45e63148bb14dbbd3d61b4f5305338176dd45.tar.gz squeal-hspec-d7b45e63148bb14dbbd3d61b4f5305338176dd45.tar.zst squeal-hspec-d7b45e63148bb14dbbd3d61b4f5305338176dd45.zip |
Add information in the README
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 15 |
1 files changed, 11 insertions, 4 deletions
@@ -1,11 +1,18 @@ | |||
1 | # squeal-hspec | 1 | # squeal-hspec |
2 | 2 | ||
3 | Helpers for creating database tests with hspec and squeal, inspired by Jonathan Fischoff's | 3 | Helpers for creating database tests with hspec and squeal, inspired by Jonathan |
4 | Fischoff's | ||
4 | [hspec-pg-transact](http://hackage.haskell.org/package/hspec-pg-transact). | 5 | [hspec-pg-transact](http://hackage.haskell.org/package/hspec-pg-transact). |
5 | 6 | ||
6 | This uses @tmp-postgres@ to automatically and connect to a temporary instance of postgres on a random port. | 7 | This uses @tmp-postgres@ to automatically and connect to a temporary instance of |
8 | postgres on a random port. | ||
7 | 9 | ||
8 | Current version is done to operate with Squeal 0.4.0.0. | 10 | Current version is done to operate with Squeal 0.4.0.0. |
9 | 11 | ||
10 | `describeDB` lets you initate a series of `itDB` specs which will operate in the same context. | 12 | `describeDB` lets you initate a series of `itDB` specs which will operate in the |
11 | It takes migrations to run and a series of fixtures to fill the database. | 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. | ||