From 4ee381fef3fb50133bea0e0397894b3e929addc8 Mon Sep 17 00:00:00 2001 From: Alan Guo Xiang Tan Date: Wed, 20 Dec 2023 12:27:49 +0800 Subject: [PATCH] DEV: Remove extra calls to `reset_sessions!` and `use_default_driver` (#24977) Why this change? Capybara is already calling those two methods: https://github.com/teamcapybara/capybara/blob/52eaecea6d154b7d664b0032cd1cbcad4788fe65/lib/capybara/rspec.rb#L20-L21 --- spec/rails_helper.rb | 2 -- 1 file changed, 2 deletions(-) diff --git a/spec/rails_helper.rb b/spec/rails_helper.rb index 057b8a15df3..e750e7b648a 100644 --- a/spec/rails_helper.rb +++ b/spec/rails_helper.rb @@ -585,8 +585,6 @@ RSpec.configure do |config| page.execute_script("if (typeof MessageBus !== 'undefined') { MessageBus.stop(); }") MessageBus.backend_instance.reset! # Clears all existing backlog from memory backend Scheduler::Defer.do_all_work # Process everything that was added to the defer queue when running the test - Capybara.reset_sessions! - Capybara.use_default_driver Discourse.redis.flushdb end