On Thursday, May 28, 2020 at 7:46:21 AM UTC-7, Aryk Grosz wrote: > > Many times in test cases, I use "byebug" and stop code execution. I want > to be able to run sql queries on my sql editor to see what data it's > returning. > > However I have things set up to roll back my queries like this: > > Database.connection.transaction(rollback: :always) do > super(&block) > end > > How can I push data to the database so that it is queryable mid test? >
You would have to ensure that you are using the same connection that the transaction used. If you are using a separate program to run the queries, that's basically impossible. You will have to switch back to non-transactional testing in this case. Thanks, Jeremy -- You received this message because you are subscribed to the Google Groups "sequel-talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/sequel-talk/4e35655d-1044-443c-9937-898ccb1d0445%40googlegroups.com.
