Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create a savepoint after user hooks run and allow rollback to it when the transaction fails #57

Open
searls opened this issue Jan 11, 2021 · 0 comments
Labels
enhancement New feature or request

Comments

@searls
Copy link
Member

searls commented Jan 11, 2021

One bummer with running all your tests inside of a transaction is that if you are debugging in rdb/console/pry, any incorrect SQL statements will abort the transaction and you'll have to start testing all over again to get a fresh transaction (since rolling back would also wipe all your test data)

Since this gem knows when users will have set (some) of their test data, it could make a savepoint (e.g. ActiveRecord::Base.connection.execute("savepoint foo")) and expose a way to rollback to that savepoint to facilitate better interactive debugging

@searls searls added the enhancement New feature or request label Jan 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant