This worked when I modified application.html.erb as shown in the
attachment, as it had the title as "SampleApp"
How was it that your tests worked then? It is important when writing
tests to write them before the code. Your tests on the title should
therefore have failed initially (as you had not yet supplied the
title). This helps to guard against errors in the test code not
actually testing what you intended, as I presume was the case here.
This worked when I modified application.html.erb as shown in the
attachment, as it had the title as "SampleApp"
How was it that your tests worked then? It is important when writing
tests to write them before the code. Your tests on the title should
therefore have failed initially (as you had not yet supplied the
title). This helps to guard against errors in the test code not
actually testing what you intended, as I presume was the case here.
Colin
I actually wrote the tests before, and have provided the titles, but the
strange thing was that I was always getting "SampleApp" as the title.
So, the tests passes since the titles were in every page I made a test
for.
In order to remove the "SampleApp" title, I had to modify
application.html.erb.