From 39bc641885376a742b5bca3251154b5208f4953d Mon Sep 17 00:00:00 2001 From: hoshinotsuyoshi Date: Sun, 20 Oct 2024 14:40:36 +0900 Subject: [PATCH] fixfix2 --- backend/spec/rails_helper.rb | 5 ----- backend/spec/support/system_test.rb | 6 +++++- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/backend/spec/rails_helper.rb b/backend/spec/rails_helper.rb index 0264309..6c61546 100644 --- a/backend/spec/rails_helper.rb +++ b/backend/spec/rails_helper.rb @@ -66,8 +66,3 @@ # arbitrary gems may also be filtered via: # config.filter_gems_from_backtrace("gem name") end - - -require 'capybara/rspec' - -Capybara.server = :puma, { Silent: true } diff --git a/backend/spec/support/system_test.rb b/backend/spec/support/system_test.rb index 6f52988..32def1c 100644 --- a/backend/spec/support/system_test.rb +++ b/backend/spec/support/system_test.rb @@ -1,3 +1,7 @@ +require 'capybara/rspec' + +Capybara.server = :puma, { Silent: true } + RSpec.configure do |config| using = ENV['SYSTEM_TEST_DRIVEN_BY_USING'] @@ -13,7 +17,7 @@ m = Module.new { private def chrome_driver? - Capybara.current_driver.to_s.include?('chrome') + page.driver.options.dig(:browser) == :chrome end } RSpec.configure do |config|