cypress-rails
cypress-rails copied to clipboard
Create a savepoint after user hooks run and allow rollback to it when the transaction fails
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