Hi there, Given my recent problems with .should render_template after a second post, I''m wondering if there''s a way I set the state as logged in inside a given step without posting to sessions/create? I can''t seem to directly set sessions[:user_id]. I''m using restful_authentication. This is a story as opposed to a spec.. Cheers, Tim. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/rspec-users/attachments/20080402/bba6eb55/attachment.html
On Wed, Apr 2, 2008 at 1:16 AM, Tim Haines <tmhaines at gmail.com> wrote:> Hi there, > > Given my recent problems with .should render_template after a second post, > I''m wondering if there''s a way I set the state as logged in inside a given > step without posting to sessions/create?Why not just post to sessions/create? That works, doesn''t it?> I can''t seem to directly set > sessions[:user_id]. I''m using restful_authentication. > > This is a story as opposed to a spec.. > > Cheers, > > Tim. > > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users >
Hi David. That does the login. So - yes - probably. I had thought it was breaking the "should render_template" that I make after the subsequent post, but maybe something else is causing that to break.. Tim. On 02/04/2008, David Chelimsky <dchelimsky at gmail.com> wrote:> > On Wed, Apr 2, 2008 at 1:16 AM, Tim Haines <tmhaines at gmail.com> wrote: > > Hi there, > > > > Given my recent problems with .should render_template after a second > post, > > I''m wondering if there''s a way I set the state as logged in inside a > given > > step without posting to sessions/create? > > > Why not just post to sessions/create? That works, doesn''t it? > > > > I can''t seem to directly set > > sessions[:user_id]. I''m using restful_authentication. > > > > This is a story as opposed to a spec.. > > > > Cheers, > > > > Tim. > > > > > _______________________________________________ > > rspec-users mailing list > > rspec-users at rubyforge.org > > http://rubyforge.org/mailman/listinfo/rspec-users > > > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users >-------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/rspec-users/attachments/20080402/da56daa9/attachment-0001.html
Hi Tim I haven''t had a chance to look at stories yet ... but can u not use the AuthenticatedTestHelper login_as method? Cheers Shane On 2/04/2008, at 6:16 PM, Tim Haines wrote:> Hi there, > > Given my recent problems with .should render_template after a second > post, I''m wondering if there''s a way I set the state as logged in > inside a given step without posting to sessions/create? I can''t > seem to directly set sessions[:user_id]. I''m using > restful_authentication. > > This is a story as opposed to a spec.. > > Cheers, > > Tim. > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users