0

Hi we have made a module for a controller and that module uses the session_id to store some information.

It works well when we run it.

When running cucumber it seams like the request is null.

undefined method `session_options' for nil:NilClass (NoMethodError)

here is what we do in the module

request.session_options[:id]

We are trying to avoid mocking the request since we have logic based on information like request.remote_ip and request.session_options[:id]

Tried with cookies and the same issue comes up. cookies is always nil, is this a limitation of cucumber?

Emanuel
  • 610
  • 6
  • 15

1 Answers1

0

Cucumber does not have access to the request object, nor the session variables. This related question has some suggestions for solutions that you might be able to adapt to your problem:

Session variables with Cucumber Stories

Community
  • 1
  • 1
Matt Connolly
  • 9,757
  • 2
  • 65
  • 61