What are people's thoughts on unit testing in the model? I was
looking through the RoR manual and it showed some examples of
testing CRUD operations. Does this make much sense? Aren't you just
testing ActiveRecord and Rails at this point?
If you are interested in testing your validation rules you could have
something like ...
Why actually test the persistence to the database? When using Java
and Hibernate I would test the actual persistence but that was so I
could test the actual mapping configuration. I suppose with Rails you
can still check if the associations are mapped correctly (such that
they are actually persisted.)
What else should one test in models? Other then validation the other
good candidate seems to be class methods.
Just curious what people are doing....