开发者

Cucumber test not deleting data

开发者 https://www.devze.com 2023-02-07 20:26 出处:网络
I have a project with several features in cucumber both plain and selenium are failing indicating problems when trying to create a user because of the email uniqness validation (so the records are not

I have a project with several features in cucumber both plain and selenium are failing indicating problems when trying to create a user because of the email uniqness validation (so the records are not being deleted and every background on the feature is failing)

I get a warning like this "WARNING: You have set Rails' config.cache_classes to false (most likely in config/environments/cucumber.rb). 开发者_运维知识库This setting is known to break Cucumber's use_transactional_fixtures method. Set config.cache_classes to true if you want to use transactional fixtures. For more information see https://rspec.lighthouseapp.com/projects/16211/tickets/165."

Weird enough all my enviroments have the session_cache set to true (just development hast it on false but I also tried setting it to true and run it)

Also the same project is working on other computers I tried uninstaling ruby and all the gems from rvm and reinstall but I still get the same error

Any ideas what else i could try to solve this on my mac? also database cleaning strategy is set to fixtures

I appreciate your time


I would try using a hook to clear out the data.

https://github.com/cucumber/cucumber/wiki/Hooks

A before hook that will do a .destroy on all records to ensure a clean start may be a good bet. It feels hacky to me, but may help you further diagnose the failure.

0

精彩评论

暂无评论...
验证码 换一张
取 消