Skip to content

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

Description

@searls

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions