DEV: Allow Capybara's server port to be configurable (#23606)
Why this change? This allows scripts to configure the server port and avoid hardcoding the default port that is used in Discourse core.
This commit is contained in:
parent
bbad09df0e
commit
9b5ab7a764
|
@ -310,7 +310,9 @@ RSpec.configure do |config|
|
|||
|
||||
Capybara.configure do |capybara_config|
|
||||
capybara_config.server_host = ENV["CAPYBARA_SERVER_HOST"].presence || "localhost"
|
||||
capybara_config.server_port = 31_337 + ENV["TEST_ENV_NUMBER"].to_i
|
||||
|
||||
capybara_config.server_port =
|
||||
(ENV["CAPYBARA_SERVER_PORT"].presence || "31_337").to_i + ENV["TEST_ENV_NUMBER"].to_i
|
||||
end
|
||||
|
||||
module IgnoreUnicornCapturedErrors
|
||||
|
|
Loading…
Reference in New Issue