17 May 16:04
attachment_fu, how would you test this?
From: Xdmx Xdmx <rails-mailing-list@...>
Subject: attachment_fu, how would you test this?
Newsgroups: gmane.comp.lang.ruby.rails
Date: 2008-05-17 14:08:51 GMT
Subject: attachment_fu, how would you test this?
Newsgroups: gmane.comp.lang.ruby.rails
Date: 2008-05-17 14:08:51 GMT
Hi, i'm starting to go nuts because of this. i'm playing with attachment_fu, everything is ok, but i also want to put everything under test too. Actually i've a post, where you can upload images, and it works. But now i want to set that it's mandatory to upload at least 1 image. The code it's quite simple and stupid: errors.add(:image, 'at least one') if post.images.size.zero? ...and obviously it works... ...but how would you test this by unit tests? -- -- 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 rubyonrails-talk@... To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe@... For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
RSS Feed