test 7,9 schould be failing but is a success (Michael Hart tutorial)

Hello,

IM at listing 7,9 of the tutorial and according to the book that one must be red. But on my system it is green.

Can anyone explain that.

My code can be found here : https://github.com/roelof1967/sample_app

Roelof

A simple technique to debug your code is to use puts statements. They will output into the server window. Insert them at appropriate points in the code and you should be able to work out what is going on. Sometimes the output may not appear exactly where you might expect, due to buffing, but it is not difficult to work out. You will learn more sophisticated debugging techniques later I expect.

Also have a look at the log file (log/test.log for tests) when the test runs, you may see something helpful there.

Colin

Colin,

Thanks,

But how can I use puts when rspec is checking for the tags

I have looked at the log/test.logs but nothing looks wierd there.

Roelof

Colin,

Thanks,

But how can I use puts when rspec is checking for the tags <title>

The first thing to determine is whether it is your test that is not working as intended, or the code. Open the page being tested in a browser and view the html source. Check the tags there. Then you will know where to look for the problem. That assumes you understand what the test is trying to do and what html the code should produce of course.

Colin