[rspec-users] [cucumber] webrat+selenium integration problem: record n

Balint Erdi lists at ruby-forum.com
Tue Mar 24 17:48:52 EDT 2009


@Ben: Thank you, I fixed that and am using your database_cleaner to 
truncate the database.

Turns out the problem (or rather, another problem) was that I set up a 
separate environment (selenium) for the selenium tests but still some of 
the steps used the test environment and thus the database record was 
generated in the test database not in the selenium one where it should 
have been.

I struggled to get the record creation happen in the selenium database 
but finally I gave up and am now using the test for both selenium and 
"plain" cucumber features. So the database_cleaner serves me even 
better. It works! My current config is here: 
http://gist.github.com/83635. Once again, thank you for your help.

@Mike: I may check that out, thank you!

Balint

Ben Mabey wrote:
> Balint Erdi wrote:
>>     And I fill in "password" with "secret"
>>
>> 5. the users table in the database that selenium uses is empty.
>> (mysql> select * from users;
>> Empty set (0.00 sec) ). That surprises me a bit since in theory
>> selenium does not use transactional fixtures so the record should
>> appear right away after (1) runs.
>>   
> 
> Webrat's Selenium adapter will not change your DB settings.  On line 10
> on your env.rb file you actually have transactional support turned on.
> You need to comment that line out when using Selenium.  For more info
> please read about this problem on the wiki:
> 
> http://wiki.github.com/aslakhellesoy/cucumber/troubleshooting
> 
> HTH,
> Ben

-- 
Posted via http://www.ruby-forum.com/.


More information about the rspec-users mailing list