[rspec-users] Cookie Session Store Not Working in Safari

Glenn Ford glenn at aldenta.com
Thu Jan 3 00:35:09 EST 2008


Whoops, you're very right, this isn't the RoR list!  Oh well it's the  
only one I ever use.  My bad!  Let's look at it this way... my spec's  
are failing because I can't use session!  What do I do? :)

On Jan 2, 2008, at 11:36 PM, Giles Bowkett wrote:

> Sorry, I'm new here, but isn't this totally irrelevant to RSpec in  
> every way?
>
> On 1/2/08, Glenn Ford <glenn at aldenta.com> wrote:
>>
>> Here's the steps I followed:
>>
>> Generated the test code
>> rails test
>> mate test
>> cd test
>> script/generate scaffold thing
>> rake db:create
>> script/server
>>
>>
>> Modified things_controller.rb index and new:
>> def index
>> end
>> def new
>> session[:user] = 5
>> redirect_to(things_path)
>> end
>>
>> Set index.html.erb to:
>> Hello! <%= session[:user] %>
>> <%= link_to 'New thing', new_thing_path %>
>>
>> -------
>>
>> Now when I go to the page in FireFox, I see "Hello" on the screen.   
>> Clicking
>> the link gives me "Hello 5" on my screen.  This is expected.
>>
>> However, when I go to Safari, I only ever see "Hello" and never  
>> "Hello 5".
>> I have, in the Safari preferences, accept cookies set to "Accept  
>> All".  I've
>> checked everything I can think of to make sure nothing is blocking  
>> it.
>>
>> I've inspected the session and the only thing I can find is that  
>> the Session
>> ID for the Safari requests is a new 32 character string for every  
>> request,
>> and for FireFox requests it's the same 128 character string for every
>> request.
>>
>> I'm using Ruby on Rails 2.0.2.  I hope I'm not forgetting some  
>> other useful
>> piece of info.
>>
>> How do I get this to work for me in Safari?
>>
>> Thanks,
>> Glenn
>> _______________________________________________
>> rspec-users mailing list
>> rspec-users at rubyforge.org
>> http://rubyforge.org/mailman/listinfo/rspec-users
>>
>
>
> -- 
> Giles Bowkett
>
> Podcast: http://hollywoodgrit.blogspot.com
> Blog: http://gilesbowkett.blogspot.com
> Portfolio: http://www.gilesgoatboy.org
> Tumblelog: http://giles.tumblr.com
> _______________________________________________
> rspec-users mailing list
> rspec-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/rspec-users



More information about the rspec-users mailing list