On Fri, Aug 29, 2008 at 9:03 AM, Nick Hoffman <[EMAIL PROTECTED]> wrote: > On 2008-08-29, at 04:51, Joseph Wilk wrote: >> >> I started using a set of methods to deal with this problem from code in >> the RadiantCMS(http://radiantcms.org/) project. >> >> http://gist.github.com/7936 >> >> I stopped using it after a while finding the tests did not read well. >> Your method improves on Radiant's which has tempted me to start testing >> models like this again. >> >> Thanks! >> -- >> Joseph Wilk >> http://www.joesniff.co.uk > > Thanks for the vote of confidence, Joseph! I have two other methods that go > alongside #describe_model_attribute which you might find useful. I'm in the > process of wrapping them up into a plugin. Until that's finished, I've > pasted them at http://pastie.org/262508 and http://pastie.org/262509 .
Hey Nick - I'm not clear why you need these, given that you already have the describe_model_attributes macro, which you can use to handle nils and will give you a meaningful error if there is a problem with your factory. What's your goal here? > > Cheers, > Nick > _______________________________________________ > rspec-users mailing list > rspec-users@rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users > _______________________________________________ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users