[rspec-users] Setting session values

Jonathan Linowes jonathan at parkerhill.com
Wed Oct 24 21:29:39 EDT 2007


i've done this in controller specs

session[:whatever] = something
do_it

--linoj

On Oct 24, 2007, at 9:06 PM, Steve wrote:

> Okay, I give up. I have been trying to set session values in a  
> controller,
> but no matter what, once the request is made and inside the  
> controller,
> the session is empty. What's the correct way? I have tried
>
> session['whatever'] = something
> controller.stub!(:session).and_return(session)
>
> I tried creating a new session, but nothing seems to do it. I'm sure
> there's something I'm missing. Suggestions?
>
> Thanks,
> Steve
>
> _______________________________________________
> rspec-users mailing list
> rspec-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/rspec-users



More information about the rspec-users mailing list