I think you need to clarify what you mean by 'spec an attachment_fu model'.

Do you want the validates_as_attachment to succeed with your test data, 
for instance?  If so, simply stub the call: 
Picture.should_receive(:validates_as_attachment) so that you can be 
confident the model does the right thing (ensuring it is validated in 
real life) but the real validation code is never called and so never 
added to the validation chain, so your test models will save without 
hassle.  I think that's the gist of your problem - you can't get test 
model instances to validate and so cannot write meaningful tests?

Alternatively you may have to include your failing specs so we can 
understand your situation more clearly.

Best wishes,
  Jerry
_______________________________________________
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users

Reply via email to