Displaying 1 result from an estimated 1 matches for "guernica".
2008 Mar 03
2
stuck on testing validation
...does this work?
before(:each) do
@work = Work.new
end
#for testing validates_presence_of :title
it "should require a title" do
@work.title = nil
@work.should_not be_valid
end
while this doesn''t:
def valid_work_attributes
{
:title => "guernica",
:description => "lorem ipsum lorem ipsum",
:date => Date.today,
:category => Category.new(:name => "belle epoque")
}
end
before(:each) do
@work = Work.new
end
it "should require a title" do
@work.attributes = v...