Re: [rspec-users] Session empty after request

2008-03-09 Thread David Chelimsky
On Sat, Mar 8, 2008 at 4:37 PM, Steve <[EMAIL PROTECTED]> wrote: > Can anyone tell me what I'm doing wrong here? > > it 'should try to set the current user from the session' do > controller.session[SessionKeys::USER_ID] = 1 > user = mock_model(User) > User.stub!(:find).and_return(user) > U

[rspec-users] Session empty after request

2008-03-08 Thread Steve
Can anyone tell me what I'm doing wrong here? it 'should try to set the current user from the session' do controller.session[SessionKeys::USER_ID] = 1 user = mock_model(User) User.stub!(:find).and_return(user) User.should_receive(:find).with(1).and_return(user) controller.should_receive(