On Sat, Oct 23, 2010 at 5:21 AM, Phoenix Rising <[email protected]>wrote:
> Hey guys, > > Chances are there's probably something I just plain missed here, but > for some reason it appears that my test DB isn't being cleared out > between tests when using shoulda with Rails 3. > > I'm calling tests via rake test:[units/functionals], and my tests > exist in the usual place. Shoulda is installed with > factory_girl_rails and both appear to be working properly in and of > themselves. However, I'm getting a lot of validation errors with each > of my tests because various names and such are already taken when a > given test runs, because records were created based off the same > factories in another test that runs prior. > > Does anyone have any ideas as to what I could be missing here? Is > there a hidden option that I have to configure to tell it to blow away > test data between each test? I thought Test::Unit was supposed to do > that automagically, but maybe I'm missing something. > > Thanks for any help you can provide. It's appreciated. I remember encountering something like this before. Could you give a sample test which shows how and where the factories are being called? -- Erol M. Fornoles http://erolfornoles.posterous.com http://github.com/Erol http://twitter.com/erolfornoles http://ph.linkedin.com/in/erolfornoles -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

