All I want to do is set a session variable when I make a request.
Here’s my code:
class ProjectIntegrationTest < ActionController::IntegrationTest
user = user_for_test
open_session do |thing|
session[:user_id] = ‘someid’
I’m getting this error:
NoMethodError: undefined method `user’ for
method method_missing in test_process.rb at line 464
method send! in integration.rb at line 448
method method_missing in integration.rb at line 448
method user_for_test in project_integration_test.rb at line 11
Line 11 is the line where “session[:user_id] = ‘someid’” is being set.
What am I doing wrong for setting the session?