On 8 August 2010 10:56, Abder-Rahman Ali <li...@ruby-forum.com> wrote:
> Colin Law wrote:
>> On 7 August 2010 23:23, Abder-Rahman Ali <li...@ruby-forum.com> wrote:
>>> 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.

I don't understand, if all the titles were 'SampleApp' how did the
tests pass, since they presumably were checking for the correct
titles?

Colin

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-t...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to