Pat Maddox
2006-Feb-10 08:12 UTC
[Rails] Functional testing - why can you use session[:key] but not session[:key]= ?
Question''s all in the title.. def test_foo assert_equal ''foo'', session[:bar] # Perfectly valid end def test_blowup session[:bar] = foo # TypeError: Symbol as array index ... end I always create a @session variable in the setup method. Just curious as to why you can get session values but not set them using session[] Pat