Well I am glad I helped catch this then, even though I failed to
realize how serious it was.

Thanks,
Jean

On 1/28/07, Julian Tarkhanov <[EMAIL PROTECTED]> wrote:
>
>
> On Jan 28, 2007, at 2:04 PM, Jean Helou wrote:
>
> > I was the original reporter of the bug.
> > After reviewing the patch and re-reading my original bug report I
> > understand why it didn't work ...
> > I stored the information from the request to session['http_lang'] and
> > in the test I tried to retrieve it with session[:http_lang].
> >
> > Now it makes me wonder if this was really a bug at all ... while the
> > patch will make it work (since it converts the argument to [] and []=
> > to a string thus effectively changing my call to session[:http_lang]
> > to session['http_lang']) I can't remember if calling session[:symbol]
> > and session['symbol'] is supposed to be the same ...
>
> The official Guide To Testing The Rails _specifically_ mentions that
> of all testing hash containers only
> the assigns are sensitive to string/symbol differences.
>
> Therefore I filed it as a bug (especially knowing that the real
> Session objects are indifferent). You should also consider
> that a bug like this might make some _auth tests_ that you have in
> your app pass while the app actually does the wrong thing
>
> ..inside action, up there
>         unless condition_that_does_not_fire_but_should
>                 session[:user_pwd] = MD5.new(xxx_secret)
>
> ...down here in the test
>         assert_nil session['user_pwd'], 'Authentication should have been
> cleared from the session'
>
> and there you are :-)
> --
> Julian 'Julik' Tarkhanov
> please send all personal mail to
> me at julik.nl
>
>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Core" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-core?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to