Re: [Rails] test 7,9 schould be failing but is a success (Michael Hart tutorial)

2014-07-18 Thread Colin Law
On 17 July 2014 16:04, Roelof Wobben  wrote:
> Colin,
>
> Thanks,
>
> But how can I use puts when rspec is checking for the tags 

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

>
> I have looked at the log/test.logs but nothing looks wierd there.
>
> Roelof
>
>
> Op donderdag 17 juli 2014 16:16:57 UTC+2 schreef Colin Law:
>>
>> On 17 July 2014 12:44, Roelof Wobben  wrote:
>> > 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.
>>
>> 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
>
> --
> You received this message because you are subscribed to the Google Groups
> "Ruby on Rails: Talk" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to rubyonrails-talk+unsubscr...@googlegroups.com.
> To post to this group, send email to rubyonrails-talk@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/rubyonrails-talk/a1d6523f-5b92-4b74-9dcc-0146d694a93e%40googlegroups.com.
>
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to rubyonrails-talk+unsubscr...@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rubyonrails-talk/CAL%3D0gLtJppKYMpEctdHajSVn822BHK7EoZWKvLBmi0cqVrmrSg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Rails] test 7,9 schould be failing but is a success (Michael Hart tutorial)

2014-07-17 Thread Roelof Wobben
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


Op donderdag 17 juli 2014 16:16:57 UTC+2 schreef Colin Law:
>
> On 17 July 2014 12:44, Roelof Wobben > 
> wrote: 
> > 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. 
>
> 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 
>

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to rubyonrails-talk+unsubscr...@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rubyonrails-talk/a1d6523f-5b92-4b74-9dcc-0146d694a93e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Rails] test 7,9 schould be failing but is a success (Michael Hart tutorial)

2014-07-17 Thread Colin Law
On 17 July 2014 12:44, Roelof Wobben  wrote:
> 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.

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

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to rubyonrails-talk+unsubscr...@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rubyonrails-talk/CAL%3D0gLvOh0JE-csqnjgeDH4G3kYeFW3E_DwPNFNbz1YLrCv9uA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.