4 ms·
> which depends on fast setup and teardown In postgres at least, Wouldn't your framework create a db transaction that then is rolled back at the end of the tes
by afarrell 9y ago
> which depends on fast setup and teardown
In postgres at least, Wouldn't your framework create a db transaction that then is rolled back at the end of the test?
- geophile 9y agoThat only works if the code you are testing does everything in auto-commit mode. Which is often a terrible idea. If your code uses transactions, then no, the framework cannot rely on rollback to do setup and teardown.
- brianwawok 9y agoI use django with transactions and tests work fine. I think a transaction within a transaction is treated as a checkpoint.
- afarrell 9y agoTests with transactions works fine in rails/rspec.