comment_spec.rb 274 Bytes Edit Raw Blame History 1 2 3 4 5 6 7 8 9 10 11 12 require 'spec_helper' describe Comment do context 'validations' do it 'should require a body' do comment = Fabricate.build(:comment, :body => nil) comment.should_not be_valid comment.errors[:body].should include("can't be blank") end end end