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
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?