We are using Spring in our tests for sequential test execution but not for parallel test execution. And Rails requires you to set the
config.cache_classes = false if you are using Spring in tests.
With our setup, this would raise the following error infor parallel test executions due to some legacy database cleaner issue.
WARNING: You have set Rails' config.cache_classes to false (Spring needs cache_classes set to false). This is known to cause problems with database transactions. Set config.cache_classes to true if you want to use transactions.
You need to upgrade to
cucumber-rails >= 2.1.0 and adjust the
config/environments/test.rb like below:
config.cache_classes = !defined?(Spring)