New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change the system tests to set Puma as default server only when the user haven't specified manually another server. #31384

Merged
merged 1 commit into from Dec 9, 2017

Conversation

Projects
None yet
2 participants
@guilleiguaran
Member

guilleiguaran commented Dec 9, 2017

In our app we are configuring a custom server for Capybara in this way:

Capybara.register_server(:unicorn) do |app, port, host|
  Unicorn::HttpServer.new(app, listeners: "#{host}:#{port}", logger: Logger.new(nil)).start.join
end

Capybara.server = :unicorn

But System Tests are overriding the Capybara.server to :puma so our configuration isn't taking effect.

With this change, the Capybara.server is set only if the user hasn't customized it manually (so it's other than :default).

Change the system tests to set Puma as default server only when the u…
…ser haven't specified manually another server.
@eileencodes

This comment has been minimized.

Show comment
Hide comment
@eileencodes

eileencodes Dec 9, 2017

Member

What do you think about adding Unicorn as a server option instead? I originally had support for that but since Puma was the default for rails we dropped support for setting drivers.

We can also consider doing that later. This PR works if you're in a bind. 😄

Member

eileencodes commented Dec 9, 2017

What do you think about adding Unicorn as a server option instead? I originally had support for that but since Puma was the default for rails we dropped support for setting drivers.

We can also consider doing that later. This PR works if you're in a bind. 😄

@guilleiguaran guilleiguaran merged commit 1b24fb2 into master Dec 9, 2017

2 of 3 checks passed

continuous-integration/travis-ci/push The Travis CI build failed
Details
codeclimate All good!
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@guilleiguaran

This comment has been minimized.

Show comment
Hide comment
@guilleiguaran

guilleiguaran Dec 9, 2017

Member

@eileencodes will do it!! but first I'll prepare a PR to add it as server option in Capybara side

Member

guilleiguaran commented Dec 9, 2017

@eileencodes will do it!! but first I'll prepare a PR to add it as server option in Capybara side

@kamipo kamipo deleted the dont-override-server branch Dec 10, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment