name: hspec-pg-transact version: 0.1.0.3 synopsis: Helpers for creating database tests with hspec and pg-transact description: Helpers for creating database tests with hspec and pg-transact . @hspec-pg-transact@ utilizes @tmp-postgres@ to automatically and connect to a temporary instance of @postgres@ on a random port. . > > describeDB migrate "Query” $ > itDB "work" $ do > execute_ [sql| > INSERT INTO things > VALUES (‘me’) |] > query_ [sql| > SELECT name > FROM things |] > `shouldReturn` [Only "me"] . In the example above @describeDB@ wraps @describe@ with a @beforeAll@ hook for creating a db and a @afterAll@ hook for stopping a db. . Tests can be written with @itDB@ which is wrapper around @it@ that uses the passed in @Connection@ to run a db transaction automatically for the test. . The libary also provides a few other functions for more fine grained control over running transactions in tests. . homepage: https://github.com/jfischoff/pg-transact-hspec#readme license: BSD3 license-file: LICENSE author: Jonathan Fischoff maintainer: jonathangfischoff@gmail.com copyright: 2021 Jonathan Fischoff category: Web build-type: Simple extra-source-files: README.md cabal-version: >=1.10 library hs-source-dirs: src exposed-modules: Test.Hspec.DB build-depends: base >= 4.7 && < 5 , hspec , tmp-postgres , postgresql-simple , pg-transact , bytestring , text , resource-pool default-language: Haskell2010 ghc-options: -Wall -Wno-unused-do-bind test-suite test type: exitcode-stdio-1.0 main-is: Spec.hs other-modules: Hspec.DBSpec hs-source-dirs: test build-depends: base >= 4.7 && < 5 , hspec-pg-transact , pg-transact , postgresql-simple , hspec , hspec-core , tmp-postgres default-language: Haskell2010 ghc-options: -Wall -Wno-unused-do-bind -threaded -rtsopts -with-rtsopts=-N source-repository head type: git location: https://github.com/jfischoff/pg-transact-hspec