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. Mike
i should also mention that i have the some problem when running cucumber features. On Dec 27, 2:08?am, Michael <magic6... at gmail.com> 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. > Mike > _______________________________________________ > rspec-users mailing list > rspec-us... at rubyforge.orghttp://rubyforge.org/mailman/listinfo/rspec-users
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. > Mike > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-userscheers, Matt http://mattwynne.net +447974 430184