Displaying 1 result from an estimated 1 matches for "epoqu".
Did you mean:
epoq
2008 Mar 03
2
stuck on testing validation
...= 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 = valid_work_attributes.except(:title)
@work.should_not be_valid
end
the latter example fails with "expected valid? to return false, got true" for
@...