OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub
Ruby agile-developmentangularbcfboardsbug-trackerganttgantt-chartifcissue-trackerjira-alternativekanbanopenprojectproduct-managementproject-managementproject-planningroadmaprubyscrumtimelineworkflows
Set host name as well as Capybara root options
Oliver Güntherc8625ee5a856
diff --git a/spec/support/capybara.rb b/spec/support/capybara.rbindex fcc63cf2e96..364cee17513 100644--- a/spec/support/capybara.rb+++ b/spec/support/capybara.rb@@ -5,10 +5,12 @@ require 'capybara-screenshot/rspec'require 'rack_session_access/capybara'require 'action_dispatch'-RSpec.shared_context 'with default_url_options set' do+RSpec.shared_context 'with default_url_options and host name set to Capybara test server' dobefore do@original_host = default_url_options[:host]@original_port = default_url_options[:port]+ @original_host_setting = Setting.host_name+ Setting.host_name = "#{Capybara.server_host}:#{Capybara.server_port}"default_url_options[:host] = Capybara.server_hostdefault_url_options[:port] = Capybara.server_portend@@ -16,6 +18,7 @@ RSpec.shared_context 'with default_url_options set' doafter dodefault_url_options[:host] = @original_host # rubocop:disable RSpec/InstanceVariabledefault_url_options[:port] = @original_port # rubocop:disable RSpec/InstanceVariable+ Setting.host_name = @original_host_settingendend@@ -39,7 +42,7 @@ RSpec.configure do |config|end# Set the default options- config.include_context 'with default_url_options set', type: :feature+ config.include_context 'with default_url_options and host name set to Capybara test server', type: :feature# Make it possible to match on value attribute.#