Frank J. Mattia wrote: [...] > I've just ripped out all of my Test::Unit stuff
That may or may not be good, depending on how much you had to rip out. Then again, you can always use your version control system to go back... > I am having a go at > starting fresh with RSpec, Cucumber and Machinist... Please understand > that I've only been casually programming for the past 10 years as a > way to kill time and challenge myself. I have no formal training, Neither do I. > never wrote anything serious and the fact that I've written anything > at all that works is a blessing because before last week - I had never > written a test in my life - let alone put any thought into testing an > entire application. Hey, don't feel bad. I worked professionally as a programmer for years without a systematic testing approach. > TDD/BDD are both intriguing and believe me - I see > their advantages... I'm just very slow on the uptake right now. It's > not the way I'm used to programming **read that as "I've developed a > lot of bad habits on my own and now I want to break them the right > way**. OK. > > SO. > > The one thing that keeps coming back to haunt me is that no Factory > framework seems to let you test complete objects from the has_many > side of the association without doing some serious legwork. What are you talking about? What do you mean by testing from the has_many side? > I see > examples on the Machinist git page that suggest using helper methods > but that brings me to another road block. Where do I write them? How > are they called? What types of things should I not be testing at that > level? If memory serves, the Machinist webpage tells you all you need to know here. > > Now, my own personal itch of a project is still small enough that I > don't mind ripping entire sections of tests out and rewriting them > with new frameworks just to learn how. 1) I have the time and 2) I'm > interested in learning how to do it right more than I am in doing > it... If that makes sense. The parts of my app work just fine for me > without tests... but knowing my itch, I'm going to want to add > complexity and knowing how Ruby and Rails works - I want to add it the > right way so that it's fun for me to do... Great! > > Anyway - I'm getting off topic again. > > Back in my first post I describe a situation that I was trying to > test. Could you tell me how I should be approaching that issue (which > may very well be much different than the way I've been approaching > it). Why is testing from the has_many side so taboo? Is there a > legitimate way of doing it from the belongs_to side? I think if you just set up your blueprints properly, you'll get what you need. > > Thank you for your reply and thank you too Marnen. > > You have both given me good food for thought, even if I don't know how > to eat it yet. > > Hehe. Thanks, > - FJM You're welcome! Best, -- Marnen Laibow-Koser http://www.marnen.org [email protected] -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

