John, YMMV reading something like the sinatra docs for using Cucumber, they're a pretty good resource; very much roll-your-own-rake-tasks though.
- Lee 2009/5/19 John Jones <john.jones....@gmail.com> > > No, I've not seen that one. I'm revisiting a ruby expert system I > ported last year so I'll take a look to see how to improve the > metaprograming. Also I am just in the process of setting up cucumber > to run tests on non ruby apps and to use it with the expert system > instead of test::unit. If anyone has any pointers on using cucumber in > these two non rails settings any pointers gratefully welcome. > > --------------------------------- > John Jones > UK: (+44) (0)797 644-3043 > > "Ideas are like rabbits. You get a couple and learn how to handle > them, and pretty soon you have a dozen." > John Steinbeck > > > > On Tue, May 19, 2009 at 12:25 PM, Francis Fish <francis.f...@gmail.com> > wrote: > > Thanks John > > > > Some interesting links there too. > > > > Have you seen the pragmatic screencasts on Metaprogramming? > > > > F > > > > On Tue, May 19, 2009 at 11:13 AM, John Jones <john.jones....@gmail.com> > > wrote: > >> > >> Had a similar problem a while ago, this helped me sort it out: > >> > >> > >> > http://www.thirdbit.net/articles/2007/08/01/10-things-you-should-know-about-method_missing/ > >> > >> Basically you have to catch it after acriverecord is done with it. > >> > >> BTW we decided not to use method_missing in any modules to avoid > >> spurious interractions > >> --------------------------------- > >> John Jones > >> UK: (+44) (0)797 644-3043 > >> > >> "Ideas are like rabbits. You get a couple and learn how to handle > >> them, and pretty soon you have a dozen." > >> John Steinbeck > >> > >> > >> > >> On Tue, May 19, 2009 at 10:39 AM, Francis Fish <francis.f...@gmail.com> > >> wrote: > >> > Hi guys > >> > > >> > Running 2.2.2. > >> > > >> > Background: > >> > > >> > We've created some method missing stuff in one of our active record > >> > models > >> > that allows you to do things like > >> > > >> > claim.offer_progress_received > >> > > >> > This will find or create a progress called offer and set its received > >> > date. > >> > Very happy with this because it makes what the code is doing explicit. > >> > > >> > Now, the odd bit: > >> > > >> > If I access the claim from a child record, e.g. our document class > >> > > >> > document.claim.offer_progress_received > >> > > >> > It blows with a method missing. It looks like the method_missing in > the > >> > class is being overridden when you walk up the belongs_to > relationship. > >> > > >> > I have temporarily hacked around this by doing this > >> > > >> > _claim = Claim.find(document.claim_id) > >> > > >> > And then _claim will work as advertised. > >> > > >> > Any ideas how to de hack this? I don't like having magic spells in the > >> > code. > >> > > >> > Thanks and regards, > >> > > >> > Francis > >> > > >> > > > >> > > >> > >> > > > > > > > > > > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "NWRUG" group. To post to this group, send email to nwrug-members@googlegroups.com To unsubscribe from this group, send email to nwrug-members+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/nwrug-members?hl=en -~----------~----~----~----~------~----~------~--~---