On Thu, Aug 28, 2008 at 8:41 AM, snitko
<roman-7jOJrtwkM2iHXe+LvDLADg@public.gmane.org>
wrote:>
> Very simple, but not googlable: how do I access ''session''
in my story?
> In rspec controller specs I could just say session[:user] for example,
> but this doesn''t work here.
Hi,
There''s no support for what you are trying to do. RailsStory, the
object that rspec/rails scenarios run in, is derived from
ActionController::Integration::Session, which is what rails
integration tests run in.
This is a bit confusing, but ActionController::Integration::Session is
a metaphor for an interactive session between a user and the system,
not the browser session object that you can access from your
controllers.
ActionController::Integration::Session doesn''t provide access to the
browser session as it is actually designed to let you run more than
one browser session within one test.
Hope that makes sense.
Cheers,
David
ps - feel free to post rspec questions to the rspec-users mailing list
or google group:
http://rubyforge.org/mailman/listinfo/rspec-users
http://groups.google.com/group/rspec
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---