Ok, last one - for your interest validates_length_of can be used for this purpose. There is an open bug/patch on the rails trac regarding the :within parameter but the :minimum works fine for me. As for the example the method called on @item.images is #size and not #count so -> @item.images.should_receive(:size).and_return(1)
P.S.: The bug on the rails trac: http://dev.rubyonrails.org/ticket/11295 -- Posted via http://www.ruby-forum.com/. _______________________________________________ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users