fixed restriction value conversion and added nil check

This commit is contained in:
Adam Meehan
2008-05-03 18:12:51 +10:00
parent cae3d8cb84
commit 9a8a82c699
2 changed files with 39 additions and 28 deletions

View File

@@ -9,7 +9,7 @@ describe ValidatesTimeliness::AttributeMethods do
it "should return string value for attribute_before_type_cast when written as string" do
@person.birth_date_and_time = "1980-12-25 01:02:03"
@person.birth_date_and_time_before_type_cast.should == "1980-12-25 01:02:03"
@person.birth_date_and_time_before_type_cast.should == "1980-12-25 01:02:03"
end
it "should return Time object for attribute_before_type_cast when written as Time" do