ruby-test

ruby session variables

I'm trying to write basic assert test: def assert_session_has ( sessionvar ) return assert_not_nil session[:sessionvar] end when I compile: def test_auth_bob #some setup and other validation methods assert_not_nil session[user] #more validations... end I get the following error: test_auth_bob(UserControllerTest): N...

ruby-on-rails: mocking a route in functional test

I have a route in my routes.rb file: map.connect 'login', :controller => 'users', :action => 'login' and I have a partial being rendered in a view as: login_path This view gets called in the functional test of the controller. However, in the functional test I get the error: ActionView::TemplateError: undefined local variable o...