为了尽量减少内存泄漏、僵尸进程等,我使用以下方法:Capybara.default_max_wait_time= 60
Capybara.register_driver :poltergeist do |app|Capybara::Poltergeist::Driver.new(app, {js_errors: fa
但是在Capybara的网站上,他们只展示了如何通过简单地修补ActionDispatch::IntegrationTest来准备集成测试 # Make the Capybara DSL available in all integration tests= false
DatabaseCleaner.clean # Truncate the database