[rspec-users] DB does not reset between runs
matt at mattwynne.net
Sun Dec 27 03:24:45 EST 2009
Look at your rails logs very carefully and see what's going on, paying
special attention to each call to BEGIN TRANSACTION, COMMIT
TRANSACTION. When this has happened to me in the past, it was because
I had a call to ActiveRecord::Base.connection to do some dirty raw SQL
query, and those calls will implicitly commit the whole test-case
transaction to the database.
On 27 Dec 2009, at 07:08, Michael wrote:
> For some reason any thing that is created while running specs like
> users from a Factory remain in the database between runs which leads
> to errors such as "Validation failed: Email has already been taken"
> and yes i have config.use_transactional_fixtures = true. Anyone have a
> idea why this is happening, I'm kinda stuck on moving my app forward
> until i can get this fixed.
> Thanks for any help.
> rspec-users mailing list
> rspec-users at rubyforge.org
More information about the rspec-users