-
-
Notifications
You must be signed in to change notification settings - Fork 528
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
Silence Puma's startup messages in JS specs #981
Silence Puma's startup messages in JS specs #981
Conversation
@@ -8,8 +8,12 @@ def add_gems | |||
Bundler.with_clean_env { run "bundle install" } | |||
end | |||
|
|||
def configure_chromedriver | |||
def configure_capybara |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought this new name made more sense, but I'm happy to revert this change.
copy_file "chromedriver.rb", "spec/support/chromedriver.rb" | ||
copy_file( | ||
"capybara_silence_puma.rb", | ||
"spec/support/capybara_silence_puma.rb" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Style/TrailingCommaInArguments: Put a comma after the last parameter of a multiline method call.
When Capybara starts the first JavaScript spec of a run, it starts Puma and prints out the Puma startup messages: Capybara starting Puma... * Version 3.12.1 , codename: Llamas in Pajamas * Min threads: 0, max threads: 4 * Listening on tcp://127.0.0.1:62516 By setting `Silent: true`, we can prevent those messages from being printed. A bit of background: rspec/rspec-rails#1897 Proof that Capybara uses Puma as its default server: https://github.com/teamcapybara/capybara/blob/3.24.0/lib/capybara.rb#L247-L249
a217a57
to
368ca7f
Compare
I like it! |
Capybara was configured to silence Puma in thoughtbot#981 to prevent Puma startup messages being output when running specs with `js: true`. This configuration has since been updated in [rspec-rails](rspec/rspec-rails#2289), so we can remove it here.
Capybara was configured to silence Puma in #981 to prevent Puma startup messages being output when running specs with `js: true`. This configuration has since been updated in [rspec-rails](rspec/rspec-rails#2289), so we can remove it here.
When Capybara starts the first JavaScript spec of a run, it starts Puma
and prints out the Puma startup messages:
By setting
Silent: true
, we can prevent those messages from being printed.A bit of background: rspec/rspec-rails#1897
Proof that Capybara uses Puma as its default server: https://github.com/teamcapybara/capybara/blob/3.24.0/lib/capybara.rb#L247-L249