From 7a33314ceb353a43aecf872c0bac1b8ccd3a9916 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sen=C3=A9n=20Rodero=20Rodr=C3=ADguez?= Date: Thu, 10 Jun 2021 12:03:53 +0200 Subject: [PATCH] Remove Capybara `default_set_options` for system tests using the Rack Test driver The next warning is flooding the tests log: `Options passed to Node#set but the RackTest driver doesn't support any - ignoring` As the rack test driver does not support any option, we get rid of all `default_set_options` before each system spec that uses this driver. --- spec/rails_helper.rb | 1 - spec/spec_helper.rb | 2 ++ 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/spec/rails_helper.rb b/spec/rails_helper.rb index 06d22b895..a3ecc187d 100644 --- a/spec/rails_helper.rb +++ b/spec/rails_helper.rb @@ -47,7 +47,6 @@ end Capybara.exact = true Capybara.enable_aria_label = true -Capybara.default_set_options = { clear: :backspace } Capybara.disable_animation = true OmniAuth.config.test_mode = true diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index b24cd6902..2f53625da 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -54,10 +54,12 @@ RSpec.configure do |config| config.before(:each, type: :system) do |example| driven_by :headless_chrome + Capybara.default_set_options = { clear: :backspace } end config.before(:each, type: :system, no_js: true) do driven_by :rack_test + Capybara.default_set_options = {} end config.before(:each, type: :system) do