Displaying 1 result from an estimated 1 matches for "studentsurveytest".
2005 Feb 19
0
[Error] Using validates_presence_of for datetime field causes parse error?
...the unit testing ruby file is:
def setup
@student_survey = StudentSurvey.new
#<snip>
@student_survey.creation_date = DateTime.now
end
def test_create
@student_survey.save
end
When I run this unit test, I get:
1) Error:
test_create(StudentSurveyTest):
NoMethodError: private method `gsub!'' called for #<DateTime:
11776418931730081/4800000000,-5/24,2299161>
/usr/lib/ruby/1.8/date/format.rb:238:in `_parse''
/usr/lib/ruby/1.8/parsedate.rb:9:in `parsedate''
/usr/lib/ruby/gems/1.8/gems/activerecord-1....