I'm struggling with an issue with one of my tests which not require the full Rails environment...

When looking at the full statements log, I can only see a single BEGIN line and no COMMIT statement, only a ROLLBACK in the end. And there are no INSERT statements outside the BEGIN-ROLLBACK block. But after running a single test I can see that the database is no longer empty and I have to recreate it...

If I replace spec_db_only_helper with spec_helper, which loads the full Rails environment, it works for some reason. I can't understand this.

Another difference is that I get several SELECT NULL; statements when using spec_db_only_helper while they don't show up with spec_helper.rb.

There's a single connection in the pool for the test environment.

Also, I had to call save_changes with transaction: false in my factory-girl Model.save! implementation otherwise it would generate some BEGIN-COMMIT blocks inside a DB.transaction(savepoint: true, rollback: :always){} block.

Any ideas what could be happening here?

Thanks in advance,
Rodrigo.

--
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 post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sequel-talk.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to