views:

236

answers:

1

Hi!

I'm spending my first few days with cucumber/selenium trying to figure out whether RBB is the thing I want to use in my latest RoR project.

My setting: Rails 2.3.5, selenium-client 1.2.17, cucumber 0.4.4 etc, quite current in my view.

Following the instructions on http://wiki.github.com/aslakhellesoy/cucumber/setting-up-selenium I got cucumber/selenium sorts of up and running. Simple step-definitions do work and do produce outpout that makes sense (I dont usually expect more on my first few days with anything :-) ).

My problem: I am trying to access the rails session-hash in my step-definition...and failing miserably. Refering to "session" in any "given"-clause just presents me with "undefined method `session' for nil:NilClass (NoMethodError)"

Is there any secret handshake I am missing in the docs???? Anything that has to be configured my my environment so using the session-hash is possible?

Regards Michael

A: 

This should happen right out of the box. If you add a debugger line right to a step definition you should be able to type "session" and see something like:

{:session_id=>"f978d4220252b7e1ca51fb7319d5a365", "flash"=>{}}

heavysixer
Thanks, that sounds promising, esp. the bit about the debugger!!
Michael Portz
Funny thing is: As long as I useWebrat.configure do |config| config.mode = :rails [...]I can access session information in the debugger. As soon as I switch to :selenium I cant anymore...*THINK*
Michael Portz