DEV: Add `CAPYBARA_SERVER_HOST` (#23475)
Why this change? When running in a Docker container, we want to bind the Rails server started by Capybara to 0.0.0.0 instead of localhost. This is done via the `server_host` config for Capybara which can now be configured via the `CAPYBARA_SERVER_HOST` env.
This commit is contained in:
parent
ef73d20832
commit
6beed147cd
|
@ -308,7 +308,7 @@ RSpec.configure do |config|
|
|||
Capybara.w3c_click_offset = false
|
||||
|
||||
Capybara.configure do |capybara_config|
|
||||
capybara_config.server_host = "localhost"
|
||||
capybara_config.server_host = ENV["CAPYBARA_SERVER_HOST"].presence || "localhost"
|
||||
capybara_config.server_port = 31_337 + ENV["TEST_ENV_NUMBER"].to_i
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue