Suppose I have a model Forum, have some attributes, title, content, tag.so I do it in Forum model. validates_presence_of :title validates_presence_of :tag validates_presence_of :content.
when I added validateds_presence_of, rails will restrict the attribute not be empty, when save record. so after that, Do I still need to test those attributs not_valid? like this it 'should not be valid when title empty' do Forum.new(empty_title_attrbiute_hash).should_not be_valid end it 'should not be valid when tag empty' do Forum.new(empty_tag_attrbiute_hash).should_not be_valid end it 'should not be valid when content empty' do Forum.new(empty_content_attrbiute_hash).should_not be_valid end -- Posted via http://www.ruby-forum.com/. _______________________________________________ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users