Hans wrote: > Concerning fixtures > I started with fixtures, then in my second attempt to be a good tester > I used factory girl, that worked fine for me. > In my current third attempt, after upgrading to rails 2.3.2, I do not > know how to proceed. > > I have a lot of dependencies, which makes fixtures very hard and time > consuming to use
Expensive setup is a design smell. How about all your tests only use the fewest records possible? > The reason is that the rails developing team has selected the fixture > approach (which are their reasons?) and the development of rails seems > to follow that line. Is it not then wiser to go that way and take > advantage of the improvements and tools that will be realized? The reason the Rails team went with the current style of Fixtures was because in 2004 there was _nothing_ in the sector "TDD for databases, with migrations and refactoring", besides high-end guru consultant work at big companies. So the Railsters thought outside the box, and decided to load a complete DB for each test. To remain efficient, they loaded YAML directly into INSERT statements, bypassing the models. For the first hundred records, that's not fragile... > So what to select factories or fixtures ????? Write your first test and let it tell you. The point of all of this is nothing is carved in stone... --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

