[rspec-users] [cucumber] webrat+selenium integration problem: record n
ben at benmabey.com
Wed Mar 25 19:24:29 EDT 2009
Balint Erdi wrote:
> Ben Mabey wrote:
>> Couple things I'd like to point out. In your enhanced.rb you don't need
>> to do the Before hook yourself. You can just require
>> 'database_cleaner/cucumber'. I've updated your gist to use that.
>> In your plain.rb it seems like you are trying to truncate your database
>> just once upon startup. If that is the case then the recommended way is
>> to use the clean_with method like so:
>> DatabaseCleaner.clean_with :truncation
>> Again, I have updated the gist to reflect this.
> Hey Ben, thanks a lot.
> The problem I am experiencing now is that information stored in the
> session does not seem to be retained between steps (again, only in the
> case of selenium sessions, plain sesssion work fine). So the login
> function works fine now but when I go to another page afterwards it
> throws a big error because the action tries to render something based on
> the current user.
> Is the session store I am using relevant? I used the default
> cookie-based storage and then tried to change to the active-record based
> one to no avail. My config is at http://gist.github.com/83635
Hmm.. I've never had issues with sessions not persisting when using the
selenium adapter. Nothing in your config looks wrong.
What is your login method? It is telling Selenium to go to the login
page and submit the proper credentials?
More information about the rspec-users