Hacker News new | ask | show | jobs
by geophile 3183 days ago
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.
2 comments

I use django with transactions and tests work fine. I think a transaction within a transaction is treated as a checkpoint.
Tests with transactions works fine in rails/rspec.