It may seem obvious to you that the views are basically all right
because you can see that they are when you run the s/w. However,
perhaps there are a few conditions that change the details of what
appears on the page, maybe you view the page as a normal user and as
an admin, or perhaps with a different value of some field in the
database the view changes some detail. No problem, just try each of
these conditions and check it is ok. You can easily do this each time
you update the website.
Now add another 50 different pages ( a number of different controllers
and the different views for that controller). Each of those will have
a number of things you need to check you have not accidentally messed
up when you release a new version of the site. To manually check that
all the views still operate correctly becomes virtually impossible.
With automated testing you can be reasonably sure that you have not
accidentally messed something up and will allow you to sleep soundly
in your bed at night.
Colin
The unit testing of models that we did previously seemed straightforward
enough. We called a method and compared what it returned against what
we expected it to return. But now we are dealing with a server that processes
requests and a user viewing responses in a browser. What we will need is
functional tests that verify that the model, view, and controller work well
together. Never fear, Rails makes this easy too.
It is also checking that the controller is calling appropriate model
methods. That may be what it means. But mostly it is about controller
and views, yes. It is not only checking that the correct data appears
on the view, but also checking that the correct view is shown in the
first place.
Colin