Y
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
brianwawok
3180 days ago
I use django with transactions and tests work fine. I think a transaction within a transaction is treated as a checkpoint.
link
afarrell
3179 days ago
Tests with transactions works fine in rails/rspec.
link