How to get/set session in ActionView::TestCase?

Hi,

I’m trying to use Rails 2.1 ActionView::TestCase to test my helpers.

I got really simple method in ApplicationHelper:

def current_user
User.find(session[:user_id])
end

How can I set/get session in ActionView::TestCase? It looks similar to
functional tests - there’s ActionView::TestCase::TestController, which
has request and response, but session object seems to be just an empty
array.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs