News for hackers. Stuff that matters.
Re:Ask HN: I'm less productive with TDD. Am I doing it wrong? by afarrell on Wednesday October 04, 2017 @03:19AM (#15398820)
> 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?

Re:Ask HN: I'm less productive with TDD. Am I doing it wrong? by geophile on Wednesday October 04, 2017 @01:38PM (#15402320)
That 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.
Re:Ask HN: I'm less productive with TDD. Am I doing it wrong? by brianwawok on Sunday October 08, 2017 @08:47AM (#15428001)
I use django with transactions and tests work fine. I think a transaction within a transaction is treated as a checkpoint.
Re:Ask HN: I'm less productive with TDD. Am I doing it wrong? by afarrell on Sunday October 08, 2017 @06:10PM (#15430280)
Tests with transactions works fine in rails/rspec.